Skip to content

Commit

Permalink
docs(IconButton): allow LiveEdit
Browse files Browse the repository at this point in the history
  • Loading branch information
YossiSaadi committed Apr 21, 2024
1 parent 867ba31 commit aab9278
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Canvas, Meta } from "@storybook/blocks";
import { Link } from "vibe-storybook-components";
import { Meta } from "@storybook/blocks";
import IconButton from "../IconButton";
import DialogContentContainer from "../../DialogContentContainer/DialogContentContainer";
import { Add, Bolt, Broom, HighlightColorBucket, Pin, Show } from "../../Icon/Icons";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,16 @@ export default {

export const Overview: Story = {
render: iconButtonTemplate.bind({}),

args: {
ariaLabel: "Add",
icon: Add
},
parameters: {
docs: {
liveEdit: {
isEnabled: false
}
}
}
};

Expand All @@ -53,7 +59,14 @@ export const Kinds: Story = {
<IconButton icon={Bolt} kind={IconButton.kinds.SECONDARY} ariaLabel="My secondary IconButton" />
<IconButton icon={Bolt} kind={IconButton.kinds.TERTIARY} ariaLabel="My tertiary IconButton" />
</div>
)
),
parameters: {
docs: {
liveEdit: {
scope: { Bolt }
}
}
}
};

export const Sizes: Story = {
Expand Down Expand Up @@ -102,7 +115,14 @@ export const Sizes: Story = {
ariaLabel="My large IconButton"
/>
</div>
)
),
parameters: {
docs: {
liveEdit: {
scope: { Robot }
}
}
}
};

export const Active: Story = {
Expand All @@ -119,7 +139,14 @@ export const Active: Story = {
<IconButton icon={Doc} kind={IconButton.kinds.SECONDARY} ariaLabel="My active medium IconButton" active />
<IconButton icon={Doc} kind={IconButton.kinds.TERTIARY} ariaLabel="My active large IconButton" active />
</div>
)
),
parameters: {
docs: {
liveEdit: {
scope: { Doc }
}
}
}
};

export const Disabled: Story = {
Expand Down Expand Up @@ -154,7 +181,14 @@ export const Disabled: Story = {
disabledReason="This function is not available"
/>
</div>
)
),
parameters: {
docs: {
liveEdit: {
scope: { Doc }
}
}
}
};

export const IconButtonAsToolbarButton: Story = {
Expand All @@ -174,7 +208,14 @@ export const IconButtonAsToolbarButton: Story = {
</Flex>
<div className={styles.dashboardContent} />
</Flex>
)
),
parameters: {
docs: {
liveEdit: {
scope: { styles, Drag, Filter }
}
}
}
};

export const IconButtonAsCloseButton: Story = {
Expand Down Expand Up @@ -237,5 +278,12 @@ export const IconButtonAsCloseButton: Story = {
</Flex>
<IconButton icon={CloseSmall} size={IconButton.sizes.SMALL} ariaLabel="Remove from Recycle bin" />
</>
)
),
parameters: {
docs: {
liveEdit: {
scope: { styles, person1, Item, Time, CloseSmall }
}
}
}
};

0 comments on commit aab9278

Please sign in to comment.