1
0
mirror of https://github.com/bitwarden/browser synced 2026-03-02 19:41:26 +00:00

[UIF] Prefer static string properties (#17966)

This commit is contained in:
Oscar Hinton
2025-12-18 07:49:26 +01:00
committed by jaasen-livefront
parent 27839f764d
commit 0a4a9a4541
11 changed files with 36 additions and 37 deletions

View File

@@ -23,7 +23,7 @@
'tw-transform tw-rotate-[90deg]': variantValue === 'tree' && !open(),
}"
[bitIconButton]="toggleButtonIcon()"
[buttonType]="'nav-contrast'"
buttonType="nav-contrast"
(click)="toggle($event)"
size="small"
[attr.aria-expanded]="open().toString()"

View File

@@ -144,8 +144,8 @@ export const Tree: StoryObj<NavGroupComponent> = {
template: /*html*/ `
<bit-side-nav>
<bit-nav-group text="Tree example" icon="bwi-collection-shared" [open]="true">
<bit-nav-item text="Level 1 - no children" route="t2" icon="bwi-collection-shared" [variant]="'tree'"></bit-nav-item>
<bit-nav-group text="Level 1 - with children" route="t3" icon="bwi-collection-shared" [variant]="'tree'" [open]="true">
<bit-nav-item text="Level 1 - no children" route="t2" icon="bwi-collection-shared" variant="tree"></bit-nav-item>
<bit-nav-group text="Level 1 - with children" route="t3" icon="bwi-collection-shared" variant="tree" [open]="true">
<bit-nav-group text="Level 2 - with children" route="t4" icon="bwi-collection-shared" variant="tree" [open]="true">
<bit-nav-item text="Level 3 - no children, no icon" route="t5" variant="tree"></bit-nav-item>
<bit-nav-group text="Level 3 - with children" route="t6" icon="bwi-collection-shared" variant="tree" [open]="true">

View File

@@ -90,20 +90,20 @@ export const WithChildButtons: Story = {
template: /*html*/ `
<bit-nav-item text="Hello World Very Cool World" [route]="['']" icon="bwi-collection-shared">
<button
type="button"
type="button"
slot="end"
class="tw-ms-auto"
[bitIconButton]="'bwi-pencil-square'"
[buttonType]="'nav-contrast'"
bitIconButton="bwi-pencil-square"
buttonType="nav-contrast"
size="small"
label="Edit"
></button>
<button
type="button"
type="button"
slot="end"
class="tw-ms-auto"
[bitIconButton]="'bwi-check'"
[buttonType]="'nav-contrast'"
bitIconButton="bwi-check"
buttonType="nav-contrast"
size="small"
label="Confirm"
></button>

View File

@@ -17,7 +17,7 @@
[attr.aria-label]="label()"
[title]="label()"
routerLinkActive
[ariaCurrentWhenActive]="'page'"
ariaCurrentWhenActive="page"
>
<bit-icon [icon]="sideNavService.open ? openIcon() : closedIcon()"></bit-icon>
</a>