1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

[PM-2276] Upgrade Storybook to v7 (#5258)

This commit is contained in:
Oscar Hinton
2023-05-26 15:58:06 +02:00
committed by GitHub
parent 1638a1d6f5
commit f7b372a0b0
72 changed files with 6340 additions and 16409 deletions

View File

@@ -1,4 +1,4 @@
import { Meta, moduleMetadata, Story } from "@storybook/angular";
import { Meta, StoryObj, moduleMetadata } from "@storybook/angular";
import { I18nService } from "@bitwarden/common/abstractions/i18n.service";
@@ -35,31 +35,39 @@ export default {
},
} as Meta;
const Template: Story<CalloutComponent> = (args: CalloutComponent) => ({
props: args,
template: `
<bit-callout [type]="type" [title]="title">Content</bit-callout>
`,
});
type Story = StoryObj<CalloutComponent>;
export const Success = Template.bind({});
Success.args = {
type: "success",
title: "Success",
export const Success: Story = {
render: (args) => ({
props: args,
template: `
<bit-callout [type]="type" [title]="title">Content</bit-callout>
`,
}),
args: {
type: "success",
title: "Success",
},
};
export const Info = Template.bind({});
Info.args = {
type: "info",
title: "Info",
export const Info: Story = {
...Success,
args: {
type: "info",
title: "Info",
},
};
export const Warning = Template.bind({});
Warning.args = {
type: "warning",
export const Warning: Story = {
...Success,
args: {
type: "warning",
},
};
export const Danger = Template.bind({});
Danger.args = {
type: "danger",
export const Danger: Story = {
...Success,
args: {
type: "danger",
},
};