Skip to content

Commit

Permalink
docs(Toggle): align story's TS
Browse files Browse the repository at this point in the history
  • Loading branch information
YossiSaadi committed Apr 22, 2024
1 parent e4b7eb2 commit 373ef2d
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions packages/core/src/components/Toggle/__stories__/toggle.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import { createComponentTemplate, MultipleStoryElementsWrapper } from "vibe-stor
import Toggle from "../Toggle";
import { createStoryMetaSettingsDecorator } from "../../../storybook";
import "./toggle.stories.scss";
import { Meta, StoryObj } from "@storybook/react";

type Story = StoryObj<typeof Toggle>;

const metaSettings = createStoryMetaSettingsDecorator({
component: Toggle,
Expand All @@ -15,43 +18,37 @@ export default {
component: Toggle,
argTypes: metaSettings.argTypes,
decorators: metaSettings.decorators
};
} satisfies Meta<typeof Toggle>;

const toggleTemplate = createComponentTemplate(Toggle);

export const Overview = {
render: toggleTemplate.bind({}),
name: "Overview"
export const Overview: Story = {
render: toggleTemplate.bind({})
};

export const States = {
export const States: Story = {
render: () => (
<MultipleStoryElementsWrapper className="monday-storybook-toggle_column">
<Toggle isDefaultSelected={false} />
<Toggle />
</MultipleStoryElementsWrapper>
),

name: "States"
)
};

export const Disabled = {
export const Disabled: Story = {
render: () => (
<MultipleStoryElementsWrapper className="monday-storybook-toggle_column">
<Toggle isDefaultSelected={false} disabled />
<Toggle disabled />
</MultipleStoryElementsWrapper>
),

name: "Disabled"
)
};

export const TurnOnOffAnAutomation = {
export const TurnOnOffAnAutomation: Story = {
render: () => (
<>
<h5>Board automations</h5>
<Toggle />
</>
),
name: "Turn on/ off an automation"
)
};

0 comments on commit 373ef2d

Please sign in to comment.