Skip to content

Commit

Permalink
feature: BIM-17710 - update badge demo page
Browse files Browse the repository at this point in the history
  • Loading branch information
KirillDK committed Mar 29, 2024
1 parent 07dc10a commit 873c8d7
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 28 deletions.
12 changes: 7 additions & 5 deletions projects/demo/src/app/pages/badge-demo/badge-demo.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,19 @@ <h3 demoAnchor>Badge marker block</h3>
<demo-example-viewer>
<demo-example-viewer-content>
<div class="content">
<pupa-badge>
<pupa-badge-marker [size]="size$ | async">
<div class="content__marker"></div>
<pupa-badge *ngIf="size$ | async as size">
<pupa-badge-marker [size]="size">
<pupa-counter *ngIf="size === 'medium'" [count]="99" color="primary"></pupa-counter>
<pupa-badge-indicator *ngIf="size === 'small'" [state]="state$ | async"></pupa-badge-indicator>
</pupa-badge-marker>
Badge marker
</pupa-badge>

<pupa-badge>
<pupa-badge-marker [size]="size$ | async">
Badge indicator
<pupa-badge-marker size="small">
<pupa-badge-indicator [state]="state$ | async"></pupa-badge-indicator>
</pupa-badge-marker>
Badge marker with indicator
</pupa-badge>
</div>
</demo-example-viewer-content>
Expand Down
19 changes: 2 additions & 17 deletions projects/demo/src/app/pages/badge-demo/badge-demo.component.scss
Original file line number Diff line number Diff line change
@@ -1,22 +1,7 @@
@use 'demo-variables' as *;

@use 'mixins' as *;
@use 'functions' as *;

.content {
display: flex;
flex-direction: row;
margin-top: 4rem;
margin-top: 1rem;
align-items: center;
gap: 4rem;

&__marker {
background-color: semantic-color(kind-primary-normal);
height: 100%;
width: 9rem;
}

&__indicator {
display: inline;
}
gap: 8rem;
}
20 changes: 14 additions & 6 deletions projects/demo/src/app/pages/badge-demo/badge-demo.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,25 @@ export class BadgeDemoComponent {

public readonly stateOptions: PropsOption[] = [
{
caption: 'Progress',
value: 'progress',
caption: 'New',
value: 'new',
isDefault: true,
},
{
caption: 'Complete',
value: 'complete',
caption: 'Success',
value: 'success',
},
{
caption: 'Error',
value: 'error',
caption: 'Danger',
value: 'danger',
},
{
caption: 'Warning',
value: 'warning',
},
{
caption: 'Loading',
value: 'loading',
},
];

Expand Down

0 comments on commit 873c8d7

Please sign in to comment.