organize storybook files
This commit is contained in:
Родитель
edd9a236cf
Коммит
7ecf853039
|
@ -13,7 +13,7 @@ import {
|
|||
|
||||
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
|
||||
const meta: Meta<typeof ExposureCard> = {
|
||||
title: "ExposureCard",
|
||||
title: "Dashboard/Exposures/Exposure Card",
|
||||
component: ExposureCard,
|
||||
tags: ["autodocs"],
|
||||
};
|
||||
|
|
|
@ -8,7 +8,7 @@ import { Button } from "../Button";
|
|||
|
||||
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
|
||||
const meta: Meta<typeof Button> = {
|
||||
title: "Button",
|
||||
title: "Design Systems/Atoms/Button",
|
||||
component: Button,
|
||||
};
|
||||
export default meta;
|
||||
|
|
|
@ -8,7 +8,7 @@ import { DoughnutChart } from "../Chart";
|
|||
|
||||
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
|
||||
const meta: Meta<typeof DoughnutChart> = {
|
||||
title: "Charts",
|
||||
title: "Dashboard/TopBanner/Charts",
|
||||
component: DoughnutChart,
|
||||
};
|
||||
export default meta;
|
||||
|
|
|
@ -0,0 +1,71 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
|
||||
import { Button } from "../Button";
|
||||
|
||||
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
|
||||
const meta: Meta<typeof Button> = {
|
||||
title: "Design Systems/Atoms/Checkbox",
|
||||
component: Button,
|
||||
};
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof Button>;
|
||||
|
||||
export const Primary: Story = {
|
||||
args: {
|
||||
variant: "primary",
|
||||
children: "Button",
|
||||
destructive: false,
|
||||
small: false,
|
||||
},
|
||||
};
|
||||
|
||||
export const Secondary: Story = {
|
||||
args: {
|
||||
variant: "secondary",
|
||||
children: "Button",
|
||||
},
|
||||
};
|
||||
|
||||
export const PrimarySmall: Story = {
|
||||
args: {
|
||||
variant: "primary",
|
||||
children: "Button",
|
||||
small: true,
|
||||
},
|
||||
};
|
||||
|
||||
export const PrimaryWide: Story = {
|
||||
args: {
|
||||
variant: "primary",
|
||||
children: "Button",
|
||||
wide: true,
|
||||
},
|
||||
};
|
||||
|
||||
export const SecondarySmall: Story = {
|
||||
args: {
|
||||
variant: "secondary",
|
||||
children: "Button",
|
||||
small: true,
|
||||
},
|
||||
};
|
||||
|
||||
export const PrimaryLink: Story = {
|
||||
args: {
|
||||
variant: "primary",
|
||||
children: "Button",
|
||||
href: "/",
|
||||
},
|
||||
};
|
||||
|
||||
export const SecondaryLink: Story = {
|
||||
args: {
|
||||
variant: "secondary",
|
||||
children: "Button",
|
||||
href: "/",
|
||||
},
|
||||
};
|
|
@ -20,7 +20,7 @@ const items: Array<ItemObject> = [
|
|||
];
|
||||
|
||||
const meta: Meta<typeof ComboBox> = {
|
||||
title: "ComboBox",
|
||||
title: "Design Systems/Atoms/ComboBox",
|
||||
component: ComboBox,
|
||||
};
|
||||
export default meta;
|
||||
|
|
|
@ -9,7 +9,7 @@ import { createUserWithPremiumSubscription } from "../../../../apiMocks/mockData
|
|||
import { defaultExperimentData } from "../../../../telemetry/generated/nimbus/experiments";
|
||||
|
||||
const meta: Meta<typeof CsatSurvey> = {
|
||||
title: "CsatSurvey",
|
||||
title: "Misc/CsatSurvey",
|
||||
component: CsatSurvey,
|
||||
};
|
||||
export default meta;
|
||||
|
|
|
@ -7,7 +7,7 @@ import type { Meta, StoryObj } from "@storybook/react";
|
|||
import { ExposuresFilter, FilterState } from "../ExposuresFilter";
|
||||
|
||||
const meta: Meta<typeof ExposuresFilter> = {
|
||||
title: "ExposuresFilter",
|
||||
title: "Dashboard/Exposures/FilterBar",
|
||||
component: ExposuresFilter,
|
||||
};
|
||||
export default meta;
|
||||
|
|
|
@ -7,7 +7,7 @@ import type { Meta, StoryObj } from "@storybook/react";
|
|||
import { InputField } from "../InputField";
|
||||
|
||||
const meta: Meta<typeof InputField> = {
|
||||
title: "InputField",
|
||||
title: "Design Systems/Molecules/Input Field",
|
||||
component: InputField,
|
||||
};
|
||||
export default meta;
|
||||
|
|
|
@ -7,7 +7,7 @@ import type { Meta, StoryObj } from "@storybook/react";
|
|||
import { PetitionBanner } from "../PetitionBanner";
|
||||
|
||||
const meta: Meta<typeof PetitionBanner> = {
|
||||
title: "PetitionBanner",
|
||||
title: "Misc/PetitionBanner",
|
||||
component: PetitionBanner,
|
||||
};
|
||||
export default meta;
|
||||
|
|
|
@ -21,7 +21,7 @@ const ProgressBarDemo = (props: ProgressBarProps) => {
|
|||
|
||||
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
|
||||
const meta: Meta<typeof ProgressBarEl> = {
|
||||
title: "Progress bar",
|
||||
title: "Welcome Scan/ProgressBar",
|
||||
component: ProgressBarDemo,
|
||||
};
|
||||
export default meta;
|
||||
|
|
|
@ -8,7 +8,7 @@ import { ProgressCard } from "../ProgressCard";
|
|||
|
||||
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
|
||||
const meta: Meta<typeof ProgressCard> = {
|
||||
title: "ProgressCard",
|
||||
title: "Dashboard/Top Banner/Progress Infographic",
|
||||
component: ProgressCard,
|
||||
};
|
||||
export default meta;
|
||||
|
|
|
@ -0,0 +1,71 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
|
||||
import { Button } from "../Button";
|
||||
|
||||
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
|
||||
const meta: Meta<typeof Button> = {
|
||||
title: "Design Systems/Atoms/Radio",
|
||||
component: Button,
|
||||
};
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof Button>;
|
||||
|
||||
export const Primary: Story = {
|
||||
args: {
|
||||
variant: "primary",
|
||||
children: "Button",
|
||||
destructive: false,
|
||||
small: false,
|
||||
},
|
||||
};
|
||||
|
||||
export const Secondary: Story = {
|
||||
args: {
|
||||
variant: "secondary",
|
||||
children: "Button",
|
||||
},
|
||||
};
|
||||
|
||||
export const PrimarySmall: Story = {
|
||||
args: {
|
||||
variant: "primary",
|
||||
children: "Button",
|
||||
small: true,
|
||||
},
|
||||
};
|
||||
|
||||
export const PrimaryWide: Story = {
|
||||
args: {
|
||||
variant: "primary",
|
||||
children: "Button",
|
||||
wide: true,
|
||||
},
|
||||
};
|
||||
|
||||
export const SecondarySmall: Story = {
|
||||
args: {
|
||||
variant: "secondary",
|
||||
children: "Button",
|
||||
small: true,
|
||||
},
|
||||
};
|
||||
|
||||
export const PrimaryLink: Story = {
|
||||
args: {
|
||||
variant: "primary",
|
||||
children: "Button",
|
||||
href: "/",
|
||||
},
|
||||
};
|
||||
|
||||
export const SecondaryLink: Story = {
|
||||
args: {
|
||||
variant: "secondary",
|
||||
children: "Button",
|
||||
href: "/",
|
||||
},
|
||||
};
|
|
@ -7,7 +7,7 @@ import type { Meta, StoryObj } from "@storybook/react";
|
|||
import { TabList } from "../TabList";
|
||||
|
||||
const meta: Meta<typeof TabList> = {
|
||||
title: "TabList",
|
||||
title: "Design Systems/Molecules/TabList",
|
||||
component: TabList,
|
||||
};
|
||||
export default meta;
|
||||
|
|
|
@ -58,7 +58,7 @@ const UpsellCtaWrapper = (props: UpsellCtaWrapperProps) => {
|
|||
};
|
||||
|
||||
const meta: Meta<typeof UpsellCtaWrapper> = {
|
||||
title: "Upsell CTA",
|
||||
title: "Design Systems/Atoms/Misc/Upsell CTA",
|
||||
component: UpsellCtaWrapper,
|
||||
};
|
||||
export default meta;
|
||||
|
|
|
@ -6,7 +6,7 @@ import type { Meta, StoryObj } from "@storybook/react";
|
|||
import { AppPicker } from "./AppPicker";
|
||||
|
||||
const meta: Meta<typeof AppPicker> = {
|
||||
title: "Toolbar",
|
||||
title: "Layout/Navigation/Bento App Picker",
|
||||
component: AppPicker,
|
||||
};
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import type { Meta, StoryObj } from "@storybook/react";
|
|||
import { UserMenu } from "./UserMenu";
|
||||
|
||||
const meta: Meta<typeof UserMenu> = {
|
||||
title: "Toolbar",
|
||||
title: "Layout/Navigation/Toolbar",
|
||||
component: UserMenu,
|
||||
};
|
||||
export default meta;
|
||||
|
|
|
@ -8,7 +8,7 @@ import { StatusPill } from "../StatusPill";
|
|||
|
||||
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
|
||||
const meta: Meta<typeof StatusPill> = {
|
||||
title: "Status Pill",
|
||||
title: "Design Systems/Atoms/Pill",
|
||||
component: StatusPill,
|
||||
};
|
||||
export default meta;
|
||||
|
|
Загрузка…
Ссылка в новой задаче