Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/components/ui/icon-button/index.figma.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ figma.connect(
theme: figma.enum("theme", {
primary: "primary",
negative: "negative",
neutral: "neutral",
}),
// No matching props could be found for these Figma properties:
icon: figma.instance("icon").getProps<{
Expand Down
100 changes: 53 additions & 47 deletions src/components/ui/icon-button/index.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ const meta = {
argTypes: {
variant: {
control: "select",
options: ["solid", "outline-solid", "ghost"],
options: ["solid", "outline", "ghost"],
},
size: {
control: "select",
options: ["xs", "sm", "md", "lg"],
},
theme: {
control: "select",
options: ["primary", "secondary", "negative"],
options: ["primary", "neutral", "negative"],
},
isLoading: {
control: "boolean",
Expand Down Expand Up @@ -59,53 +59,59 @@ export const Disabled: Story = {
},
};

export const Variant = () => {
return (
<div className="flex flex-row gap-2">
<IconButton variant="solid" icon="edit">
solid
</IconButton>
<IconButton variant="outline" icon="edit">
outline
</IconButton>
<IconButton variant="ghost" icon="edit">
ghost
</IconButton>
</div>
);
export const Variant: Story = {
render: args => {
return (
<div className="flex flex-row gap-2">
<IconButton {...args} variant="solid" icon="edit">
solid
</IconButton>
<IconButton {...args} variant="outline" icon="edit">
outline
</IconButton>
<IconButton {...args} variant="ghost" icon="edit">
ghost
</IconButton>
</div>
);
},
};

export const Size = () => {
return (
<div className="flex flex-row gap-2">
<IconButton size="xs" icon="edit">
extra small
</IconButton>
<IconButton size="sm" icon="edit">
small
</IconButton>
<IconButton size="md" icon="edit">
medium
</IconButton>
<IconButton size="lg" icon="edit">
large
</IconButton>
</div>
);
export const Size: Story = {
render: args => {
return (
<div className="flex flex-row gap-2">
<IconButton {...args} size="xs" icon="edit">
extra small
</IconButton>
<IconButton {...args} size="sm" icon="edit">
small
</IconButton>
<IconButton {...args} size="md" icon="edit">
medium
</IconButton>
<IconButton {...args} size="lg" icon="edit">
large
</IconButton>
</div>
);
},
};

export const Theme = () => {
return (
<div className="flex flex-row gap-2">
<IconButton theme="primary" icon="edit">
primary
</IconButton>
<IconButton theme="secondary" icon="edit">
secondary
</IconButton>
<IconButton theme="negative" icon="edit">
negative
</IconButton>
</div>
);
export const Theme: Story = {
render: args => {
return (
<div className="flex flex-row gap-2">
<IconButton {...args} theme="primary" icon="edit">
primary
</IconButton>
<IconButton {...args} theme="neutral" icon="edit">
neutral
</IconButton>
<IconButton {...args} theme="negative" icon="edit">
negative
</IconButton>
</div>
);
},
};
Loading