Skip to content

Commit

Permalink
fix: credential service minicard
Browse files Browse the repository at this point in the history
  • Loading branch information
puria committed Mar 14, 2024
1 parent eb37e10 commit 0ad6762
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/components/avatar/avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { Shape, Size } from '../types';
})
export class Avatar {
@Prop() name?: string;
@Prop() size?: Size = 'm';
@Prop() shape?: Shape = 'round';
@Prop({ reflect: true }) size?: Size = 'm';
@Prop({ reflect: true }) shape?: Shape = 'round';
@Prop({ reflect: true }) src?: string;

@State() error: boolean = false;
Expand Down
16 changes: 9 additions & 7 deletions src/components/credential-service/d-credential-service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,17 @@ export class DCredentialService {
const content = (
<div>
<d-avatar name={this.name} src={this.logoSrc} size="l"></d-avatar>
<div class="grow truncate">
<span class="name">{this.name}</span>
<span class="description">{this.description}</span>
<span class="issuer">{this.issuer}</span>
<div class="flex flex-col grow">
<d-text size="l">{this.name}</d-text>
<d-text size="s">{this.description}</d-text>
<d-text size="xs">{this.issuer}</d-text>
</div>
{this.href && (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
<path d="M3 12L21 12M21 12L12.5 20.5M21 12L12.5 3.5" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
</svg>
<div class="shrink-0">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
<path d="M3 12L21 12M21 12L12.5 20.5M21 12L12.5 3.5" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
</svg>
</div>
)}
</div>
);
Expand Down
2 changes: 2 additions & 0 deletions src/components/credential-service/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@
### Depends on

- [d-avatar](../avatar)
- [d-text](../text)

### Graph
```mermaid
graph TD;
d-credential-service --> d-avatar
d-credential-service --> d-text
style d-credential-service fill:#f9f,stroke:#333,stroke-width:4px
```

Expand Down
2 changes: 2 additions & 0 deletions src/components/text/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@

### Used by

- [d-credential-service](../credential-service)
- [d-input](../input)

### Graph
```mermaid
graph TD;
d-credential-service --> d-text
d-input --> d-text
style d-text fill:#f9f,stroke:#333,stroke-width:4px
```
Expand Down

0 comments on commit 0ad6762

Please sign in to comment.