Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: activity href #193

Merged
merged 2 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export namespace Components {
interface DActivityCard {
"date": string;
"description": string;
"href"?: string;
"logo": string;
"message": string;
"read": boolean;
Expand Down Expand Up @@ -613,6 +614,7 @@ declare namespace LocalJSX {
interface DActivityCard {
"date"?: string;
"description"?: string;
"href"?: string;
"logo"?: string;
"message"?: string;
"read"?: boolean;
Expand Down
3 changes: 2 additions & 1 deletion src/components/activity-card/d-activity-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ export class DActivityCard {
@Prop({ reflect: true }) description: string;
@Prop({ reflect: true }) date: string;
@Prop({ reflect: true }) read: boolean = false;
@Prop({ reflect: true }) href?: string;

render() {
return (
<Host>
<d-list-item name={this.message} logo-src={this.logo} href="#" description={this.description}>
<d-list-item name={this.message} logo-src={this.logo} href={this.href} description={this.description}>
<div slot="date">
<div class="flex items-center gap-2.5">
{!this.read && <d-info-led type="warning" />}
Expand Down
2 changes: 1 addition & 1 deletion src/components/activity-card/test/d-activity-card.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('d-activity-card', () => {
expect(page.root).toEqualHtml(`
<d-activity-card>
<mock:shadow-root>
<d-list-item href="#">
<d-list-item>
<div slot="date">
<div class="flex gap-2.5 items-center">
<d-info-led type="warning"></d-info-led>
Expand Down
Loading