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:
@@ -1,11 +1,13 @@
|
||||
import { Meta, moduleMetadata, Story } from "@storybook/angular";
|
||||
import { Meta, StoryObj, moduleMetadata } from "@storybook/angular";
|
||||
|
||||
import { ButtonModule } from "../button";
|
||||
|
||||
import { NoItemsComponent } from "./no-items.component";
|
||||
import { NoItemsModule } from "./no-items.module";
|
||||
|
||||
export default {
|
||||
title: "Component Library/No Items",
|
||||
component: NoItemsComponent,
|
||||
decorators: [
|
||||
moduleMetadata({
|
||||
imports: [ButtonModule, NoItemsModule],
|
||||
@@ -13,23 +15,25 @@ export default {
|
||||
],
|
||||
} as Meta;
|
||||
|
||||
const Template: Story = (args) => ({
|
||||
props: args,
|
||||
template: `
|
||||
<bit-no-items class="tw-text-main">
|
||||
<ng-container slot="title">No items found</ng-container>
|
||||
<ng-container slot="description">Your description here.</ng-container>
|
||||
<button
|
||||
slot="button"
|
||||
type="button"
|
||||
bitButton
|
||||
buttonType="secondary"
|
||||
>
|
||||
<i class="bwi bwi-plus" aria-hidden="true"></i>
|
||||
New item
|
||||
</button>
|
||||
</bit-no-items>
|
||||
`,
|
||||
});
|
||||
type Story = StoryObj<NoItemsComponent>;
|
||||
|
||||
export const Default = Template.bind({});
|
||||
export const Default: Story = {
|
||||
render: (args) => ({
|
||||
props: args,
|
||||
template: `
|
||||
<bit-no-items class="tw-text-main">
|
||||
<ng-container slot="title">No items found</ng-container>
|
||||
<ng-container slot="description">Your description here.</ng-container>
|
||||
<button
|
||||
slot="button"
|
||||
type="button"
|
||||
bitButton
|
||||
buttonType="secondary"
|
||||
>
|
||||
<i class="bwi bwi-plus" aria-hidden="true"></i>
|
||||
New item
|
||||
</button>
|
||||
</bit-no-items>
|
||||
`,
|
||||
}),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user