mirror of
https://github.com/bitwarden/browser
synced 2025-12-23 11:43:46 +00:00
[CL-573] Move all svg icons to new libs/assets (#16020)
* create libs/assets * treeshake lib and filter out non-icons from icon story * update docs * fix icon colors in browser and desktop * better name for vault icon * move illustrations
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { Meta, StoryObj } from "@storybook/angular";
|
||||
|
||||
import * as SvgIcons from "@bitwarden/assets/svg";
|
||||
|
||||
import { BitIconComponent } from "./icon.component";
|
||||
import * as GenericIcons from "./icons";
|
||||
|
||||
export default {
|
||||
title: "Component Library/Icon",
|
||||
@@ -16,14 +17,18 @@ export default {
|
||||
|
||||
type Story = StoryObj<BitIconComponent>;
|
||||
|
||||
// Filtering out the few non-icons in the libs/assets/svg import
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const { DynamicContentNotAllowedError, isIcon, svgIcon, ...Icons } = SvgIcons;
|
||||
|
||||
export const Default: Story = {
|
||||
args: {
|
||||
icon: GenericIcons.NoAccess,
|
||||
icon: Icons.NoAccess,
|
||||
},
|
||||
argTypes: {
|
||||
icon: {
|
||||
options: Object.keys(GenericIcons),
|
||||
mapping: GenericIcons,
|
||||
options: Object.keys(Icons),
|
||||
mapping: Icons,
|
||||
control: { type: "select" },
|
||||
},
|
||||
ariaLabel: {
|
||||
|
||||
Reference in New Issue
Block a user