Skip to content

Commit

Permalink
docs(Toggle): allow LiveEdit
Browse files Browse the repository at this point in the history
  • Loading branch information
YossiSaadi committed Apr 22, 2024
1 parent 373ef2d commit 0cb609e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/components/Toggle/__stories__/toggle.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Canvas, Meta } from "@storybook/blocks";
import { Meta } from "@storybook/blocks";
import Toggle from "../Toggle";
import {
BUTTON_GROUP,
Expand Down
28 changes: 25 additions & 3 deletions packages/core/src/components/Toggle/__stories__/toggle.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Toggle from "../Toggle";
import { createStoryMetaSettingsDecorator } from "../../../storybook";
import "./toggle.stories.scss";
import { Meta, StoryObj } from "@storybook/react";
import { Check, CloseSmall, Email } from "../../Icon/Icons";

type Story = StoryObj<typeof Toggle>;

Expand All @@ -23,7 +24,14 @@ export default {
const toggleTemplate = createComponentTemplate(Toggle);

export const Overview: Story = {
render: toggleTemplate.bind({})
render: toggleTemplate.bind({}),
parameters: {
docs: {
liveEdit: {
isEnabled: false
}
}
}
};

export const States: Story = {
Expand All @@ -32,7 +40,14 @@ export const States: Story = {
<Toggle isDefaultSelected={false} />
<Toggle />
</MultipleStoryElementsWrapper>
)
),
parameters: {
docs: {
liveEdit: {
scope: { MultipleStoryElementsWrapper }
}
}
}
};

export const Disabled: Story = {
Expand All @@ -41,7 +56,14 @@ export const Disabled: Story = {
<Toggle isDefaultSelected={false} disabled />
<Toggle disabled />
</MultipleStoryElementsWrapper>
)
),
parameters: {
docs: {
liveEdit: {
scope: { MultipleStoryElementsWrapper }
}
}
}
};

export const TurnOnOffAnAutomation: Story = {
Expand Down

0 comments on commit 0cb609e

Please sign in to comment.