mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-21 16:18:28 +01:00
[CL-215] Fix broken icon stories and clarify usage (#8484)
This commit is contained in:
parent
bd6b3266d4
commit
65353ae71d
@ -1,31 +1,24 @@
|
||||
import { Meta, StoryObj } from "@storybook/angular";
|
||||
|
||||
import { BitIconComponent } from "./icon.component";
|
||||
import * as GenericIcons from "./icons";
|
||||
|
||||
export default {
|
||||
title: "Component Library/Icon",
|
||||
component: BitIconComponent,
|
||||
args: {
|
||||
icon: "reportExposedPasswords",
|
||||
},
|
||||
} as Meta;
|
||||
|
||||
type Story = StoryObj<BitIconComponent>;
|
||||
|
||||
export const ReportExposedPasswords: Story = {
|
||||
render: (args) => ({
|
||||
props: args,
|
||||
template: `
|
||||
<div class="tw-bg-primary-500 tw-p-5">
|
||||
<bit-icon [icon]="icon" class="tw-text-primary-300"></bit-icon>
|
||||
</div>
|
||||
`,
|
||||
}),
|
||||
};
|
||||
|
||||
export const UnknownIcon: Story = {
|
||||
...ReportExposedPasswords,
|
||||
export const Default: Story = {
|
||||
args: {
|
||||
icon: "unknown" as any,
|
||||
icon: GenericIcons.NoAccess,
|
||||
},
|
||||
argTypes: {
|
||||
icon: {
|
||||
options: Object.keys(GenericIcons),
|
||||
mapping: GenericIcons,
|
||||
control: { type: "select" },
|
||||
},
|
||||
},
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user