1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-22 11:45:59 +01:00

[CL-119] rename slots in nav-item (#6070)

This commit is contained in:
Will Martin 2023-08-21 13:25:57 -04:00 committed by GitHub
parent 203667f3f4
commit cb1b65081a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View File

@ -29,10 +29,10 @@
</ng-template> </ng-template>
<!-- Show toggle to the left for trees otherwise to the right --> <!-- Show toggle to the left for trees otherwise to the right -->
<ng-container slot-start *ngIf="variant === 'tree'"> <ng-container slot="start" *ngIf="variant === 'tree'">
<ng-container *ngTemplateOutlet="button"></ng-container> <ng-container *ngTemplateOutlet="button"></ng-container>
</ng-container> </ng-container>
<ng-container slot-end *ngIf="variant !== 'tree'"> <ng-container slot="end" *ngIf="variant !== 'tree'">
<ng-container *ngTemplateOutlet="button"></ng-container> <ng-container *ngTemplateOutlet="button"></ng-container>
</ng-container> </ng-container>
</bit-nav-item> </bit-nav-item>

View File

@ -16,7 +16,7 @@
#slotStart #slotStart
class="[&>*:focus-visible::before]:!tw-ring-text-alt2 [&>*:hover]:!tw-border-text-alt2 [&>*]:!tw-text-alt2" class="[&>*:focus-visible::before]:!tw-ring-text-alt2 [&>*:hover]:!tw-border-text-alt2 [&>*]:!tw-text-alt2"
> >
<ng-content select="[slot-start]"></ng-content> <ng-content select="[slot=start]"></ng-content>
</div> </div>
<!-- Default content for #slotStart (for consistent sizing) --> <!-- Default content for #slotStart (for consistent sizing) -->
<div <div
@ -75,7 +75,7 @@
<div <div
class="tw-flex tw-gap-1 [&>*:focus-visible::before]:!tw-ring-text-alt2 [&>*:hover]:!tw-border-text-alt2 [&>*]:!tw-text-alt2" class="tw-flex tw-gap-1 [&>*:focus-visible::before]:!tw-ring-text-alt2 [&>*:hover]:!tw-border-text-alt2 [&>*]:!tw-text-alt2"
> >
<ng-content select="[slot-end]"></ng-content> <ng-content select="[slot=end]"></ng-content>
</div> </div>
</div> </div>
</div> </div>

View File

@ -61,7 +61,7 @@ export const WithChildButtons: Story = {
template: ` template: `
<bit-nav-item text="Hello World" [route]="['']" icon="bwi-collection"> <bit-nav-item text="Hello World" [route]="['']" icon="bwi-collection">
<button <button
slot-start slot="start"
class="tw-ml-auto" class="tw-ml-auto"
[bitIconButton]="'bwi-clone'" [bitIconButton]="'bwi-clone'"
[buttonType]="'contrast'" [buttonType]="'contrast'"
@ -69,7 +69,7 @@ export const WithChildButtons: Story = {
aria-label="option 1" aria-label="option 1"
></button> ></button>
<button <button
slot-end slot="end"
class="tw-ml-auto" class="tw-ml-auto"
[bitIconButton]="'bwi-pencil-square'" [bitIconButton]="'bwi-pencil-square'"
[buttonType]="'contrast'" [buttonType]="'contrast'"
@ -77,7 +77,7 @@ export const WithChildButtons: Story = {
aria-label="option 2" aria-label="option 2"
></button> ></button>
<button <button
slot-end slot="end"
class="tw-ml-auto" class="tw-ml-auto"
[bitIconButton]="'bwi-check'" [bitIconButton]="'bwi-check'"
[buttonType]="'contrast'" [buttonType]="'contrast'"