1
0
mirror of https://github.com/bitwarden/browser synced 2026-03-02 11:31:44 +00:00

[CL-82] rename bit-icon to bit-svg; create new bit-icon component for font icons (#18584)

* rename bit-icon to bit-svg; create new bit-icon for font icons

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* find and replace current usage

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* add custom eslint warning

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* fix incorrect usage

* fix tests

* fix tests

* Update libs/components/src/svg/index.ts

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>

* Update libs/eslint/components/no-bwi-class-usage.spec.mjs

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>

* update component api

* update class name

* use icon type in iconButton component

* update type Icon --> BitSvg

* fix bad renames

* fix more renames

* fix bad input

* revert iconButton type

* fix lint

* fix more inputs

* misc fixes

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* fix test

* add eslint ignore

* fix lint

* add comparison story

---------

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
This commit is contained in:
Will Martin
2026-01-28 11:36:27 -05:00
committed by jaasen-livefront
parent 67ff1e1d85
commit de2f4a04fc
161 changed files with 764 additions and 529 deletions

View File

@@ -1,7 +1,7 @@
<div class="tw-mx-auto tw-flex tw-flex-col tw-items-center tw-justify-center tw-pt-6">
<div class="tw-max-w-sm tw-flex tw-flex-col tw-items-center">
<div class="tw-size-24 tw-content-center">
<bit-icon [icon]="icon()" aria-hidden="true"></bit-icon>
<bit-svg [content]="icon()" aria-hidden="true"></bit-svg>
</div>
<h3 class="tw-font-medium tw-text-center tw-mt-4">
<ng-content select="[slot=title]"></ng-content>

View File

@@ -1,18 +1,17 @@
import { Component, input } from "@angular/core";
import { ChangeDetectionStrategy, Component, input } from "@angular/core";
import { NoResults } from "@bitwarden/assets/svg";
import { BitIconComponent } from "../icon/icon.component";
import { SvgComponent } from "../svg/svg.component";
/**
* Component for displaying a message when there are no items to display. Expects title, description and button slots.
*/
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({
selector: "bit-no-items",
templateUrl: "./no-items.component.html",
imports: [BitIconComponent],
imports: [SvgComponent],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class NoItemsComponent {
readonly icon = input(NoResults);