Skip to content

Commit

Permalink
fix: activity href (#193)
Browse files Browse the repository at this point in the history
* fix: activity href

* tests: update activity test
  • Loading branch information
phoebus-84 authored Dec 13, 2024
1 parent 99fb04d commit 3d49481
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
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

0 comments on commit 3d49481

Please sign in to comment.