mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 07:43:35 +00:00
[PM-2276] Upgrade Storybook to v7 (#5258)
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -37,22 +37,26 @@ export default {
|
||||
},
|
||||
} as Meta;
|
||||
|
||||
const DefaultTemplate: Story<MultiSelectComponent> = (args: MultiSelectComponent) => ({
|
||||
props: {
|
||||
...args,
|
||||
},
|
||||
template: `<bit-select [disabled]="disabled">
|
||||
<bit-option value="value1" label="Value 1" icon="bwi-collection"></bit-option>
|
||||
<bit-option value="value2" label="Value 2" icon="bwi-collection"></bit-option>
|
||||
<bit-option value="value3" label="Value 3" icon="bwi-collection"></bit-option>
|
||||
<bit-option value="value4" label="Value 4" icon="bwi-collection" disabled></bit-option>
|
||||
</bit-select>`,
|
||||
});
|
||||
type Story = StoryObj<MultiSelectComponent>;
|
||||
|
||||
export const Default = DefaultTemplate.bind({});
|
||||
Default.args = {};
|
||||
|
||||
export const Disabled = DefaultTemplate.bind({});
|
||||
Disabled.args = {
|
||||
disabled: true,
|
||||
export const Default: Story = {
|
||||
render: (args) => ({
|
||||
props: {
|
||||
...args,
|
||||
},
|
||||
template: `<bit-select [disabled]="disabled">
|
||||
<bit-option value="value1" label="Value 1" icon="bwi-collection"></bit-option>
|
||||
<bit-option value="value2" label="Value 2" icon="bwi-collection"></bit-option>
|
||||
<bit-option value="value3" label="Value 3" icon="bwi-collection"></bit-option>
|
||||
<bit-option value="value4" label="Value 4" icon="bwi-collection" disabled></bit-option>
|
||||
</bit-select>`,
|
||||
}),
|
||||
args: {},
|
||||
};
|
||||
|
||||
export const Disabled: Story = {
|
||||
...Default,
|
||||
args: {
|
||||
disabled: true,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user