Skip to content

Commit 773258d

Browse files
committed
docs: add button variants
1 parent b334b0f commit 773258d

File tree

3 files changed

+42
-1
lines changed

3 files changed

+42
-1
lines changed

packages/storybook/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"dev": "storybook dev -p 6006 --no-open"
1616
},
1717
"dependencies": {
18+
"@tabler/icons": "^3.35.0",
1819
"iconoir": "^7.11.0",
1920
"lodash.kebabcase": "^4.1.1",
2021
"react": "^19.2.0",

packages/storybook/src/stories/button.stories.tsx

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import { ScoutButton } from "@scouterna/ui-react";
2+
import LockIcon from "@tabler/icons/outline/lock.svg?raw";
3+
import TrashIcon from "@tabler/icons/outline/trash.svg?raw";
24
import preview from "#.storybook/preview";
35

46
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
@@ -18,5 +20,35 @@ export const Primary = meta.story({
1820
args: {
1921
variant: "primary",
2022
},
21-
render: (args) => <ScoutButton {...args}>Hello, World!</ScoutButton>,
23+
render: (args) => <ScoutButton {...args}>Sign in</ScoutButton>,
24+
});
25+
26+
export const Outlined = meta.story({
27+
args: {
28+
variant: "outlined",
29+
},
30+
render: (args) => <ScoutButton {...args}>Show more</ScoutButton>,
31+
});
32+
33+
export const Text = meta.story({
34+
args: {
35+
variant: "text",
36+
},
37+
render: (args) => <ScoutButton {...args}>Cancel</ScoutButton>,
38+
});
39+
40+
export const Caution = meta.story({
41+
args: {
42+
variant: "caution",
43+
icon: LockIcon,
44+
},
45+
render: (args) => <ScoutButton {...args}>Make private</ScoutButton>,
46+
});
47+
48+
export const Danger = meta.story({
49+
args: {
50+
variant: "danger",
51+
icon: TrashIcon,
52+
},
53+
render: (args) => <ScoutButton {...args}>Delete</ScoutButton>,
2254
});

pnpm-lock.yaml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)