@simplybusiness/mobius 4.2.2 → 4.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -0
- package/dist/cjs/components/Accordion/Accordion.stories.d.ts +10 -13
- package/dist/cjs/components/Accordion/Accordion.stories.js +7 -3
- package/dist/cjs/components/Accordion/Accordion.stories.js.map +1 -1
- package/dist/cjs/components/Alert/Alert.stories.d.ts +7 -17
- package/dist/cjs/components/Alert/Alert.stories.js +2 -1
- package/dist/cjs/components/Alert/Alert.stories.js.map +1 -1
- package/dist/cjs/components/Box/Box.stories.d.ts +7 -16
- package/dist/cjs/components/Box/Box.stories.js +4 -3
- package/dist/cjs/components/Box/Box.stories.js.map +1 -1
- package/dist/cjs/components/Breadcrumbs/Breadcrumbs.stories.d.ts +7 -9
- package/dist/cjs/components/Breadcrumbs/Breadcrumbs.stories.js +2 -1
- package/dist/cjs/components/Breadcrumbs/Breadcrumbs.stories.js.map +1 -1
- package/dist/cjs/components/Button/Button.stories.d.ts +17 -58
- package/dist/cjs/components/Button/Button.stories.js +4 -3
- package/dist/cjs/components/Button/Button.stories.js.map +1 -1
- package/dist/cjs/components/Checkbox/Checkbox.stories.d.ts +10 -30
- package/dist/cjs/components/Checkbox/Checkbox.stories.js +7 -3
- package/dist/cjs/components/Checkbox/Checkbox.stories.js.map +1 -1
- package/dist/cjs/components/Checkbox/CheckboxGroup.stories.d.ts +9 -24
- package/dist/cjs/components/Checkbox/CheckboxGroup.stories.js +7 -3
- package/dist/cjs/components/Checkbox/CheckboxGroup.stories.js.map +1 -1
- package/dist/cjs/components/Container/Container.stories.d.ts +6 -8
- package/dist/cjs/components/Container/Container.stories.js +2 -1
- package/dist/cjs/components/Container/Container.stories.js.map +1 -1
- package/dist/cjs/components/Divider/Divider.stories.d.ts +6 -11
- package/dist/cjs/components/Divider/Divider.stories.js +6 -1
- package/dist/cjs/components/Divider/Divider.stories.js.map +1 -1
- package/dist/cjs/components/Drawer/Drawer.stories.d.ts +8 -27
- package/dist/cjs/components/Drawer/Drawer.stories.js +10 -9
- package/dist/cjs/components/Drawer/Drawer.stories.js.map +1 -1
- package/dist/cjs/components/DropdownMenu/DropdownMenu.stories.d.ts +6 -19
- package/dist/cjs/components/DropdownMenu/DropdownMenu.stories.js +12 -11
- package/dist/cjs/components/DropdownMenu/DropdownMenu.stories.js.map +1 -1
- package/dist/cjs/components/ErrorMessage/ErrorMessage.stories.d.ts +7 -12
- package/dist/cjs/components/ErrorMessage/ErrorMessage.stories.js +2 -1
- package/dist/cjs/components/ErrorMessage/ErrorMessage.stories.js.map +1 -1
- package/dist/cjs/components/Fieldset/Fieldset.stories.d.ts +7 -10
- package/dist/cjs/components/Fieldset/Fieldset.stories.js +7 -3
- package/dist/cjs/components/Fieldset/Fieldset.stories.js.map +1 -1
- package/dist/cjs/components/Flex/Flex.stories.d.ts +6 -81
- package/dist/cjs/components/Flex/Flex.stories.js +8 -7
- package/dist/cjs/components/Flex/Flex.stories.js.map +1 -1
- package/dist/cjs/components/Grid/Grid.stories.d.ts +7 -82
- package/dist/cjs/components/Grid/Grid.stories.js +19 -19
- package/dist/cjs/components/Grid/Grid.stories.js.map +1 -1
- package/dist/cjs/components/Icon/Icon.stories.d.ts +6 -9
- package/dist/cjs/components/Icon/Icon.stories.js +5 -4
- package/dist/cjs/components/Icon/Icon.stories.js.map +1 -1
- package/dist/cjs/components/Image/Image.stories.d.ts +6 -8
- package/dist/cjs/components/Image/Image.stories.js +3 -2
- package/dist/cjs/components/Image/Image.stories.js.map +1 -1
- package/dist/cjs/components/Label/Label.stories.d.ts +6 -8
- package/dist/cjs/components/Label/Label.stories.js +2 -1
- package/dist/cjs/components/Label/Label.stories.js.map +1 -1
- package/dist/cjs/components/Link/Link.stories.d.ts +7 -38
- package/dist/cjs/components/Link/Link.stories.js +4 -3
- package/dist/cjs/components/Link/Link.stories.js.map +1 -1
- package/dist/cjs/components/LinkButton/LinkButton.stories.d.ts +5 -47
- package/dist/cjs/components/LinkButton/LinkButton.stories.js +4 -3
- package/dist/cjs/components/LinkButton/LinkButton.stories.js.map +1 -1
- package/dist/cjs/components/List/List.stories.d.ts +10 -33
- package/dist/cjs/components/List/List.stories.js +4 -3
- package/dist/cjs/components/List/List.stories.js.map +1 -1
- package/dist/cjs/components/LoadingIndicator/LoadingIndicator.d.ts +2 -6
- package/dist/cjs/components/LoadingIndicator/LoadingIndicator.js.map +1 -1
- package/dist/cjs/components/LoadingIndicator/LoadingIndicator.stories.d.ts +9 -36
- package/dist/cjs/components/LoadingIndicator/LoadingIndicator.stories.js +7 -9
- package/dist/cjs/components/LoadingIndicator/LoadingIndicator.stories.js.map +1 -1
- package/dist/cjs/components/Logo/Logo.stories.d.ts +6 -16
- package/dist/cjs/components/Logo/Logo.stories.js +5 -4
- package/dist/cjs/components/Logo/Logo.stories.js.map +1 -1
- package/dist/cjs/components/Modal/Modal.stories.d.ts +10 -42
- package/dist/cjs/components/Modal/Modal.stories.js +18 -17
- package/dist/cjs/components/Modal/Modal.stories.js.map +1 -1
- package/dist/cjs/components/NumberField/NumberField.stories.d.ts +10 -52
- package/dist/cjs/components/NumberField/NumberField.stories.js +7 -3
- package/dist/cjs/components/NumberField/NumberField.stories.js.map +1 -1
- package/dist/cjs/components/PasswordField/PasswordField.stories.d.ts +6 -30
- package/dist/cjs/components/PasswordField/PasswordField.stories.js +7 -3
- package/dist/cjs/components/PasswordField/PasswordField.stories.js.map +1 -1
- package/dist/cjs/components/Popover/Popover.stories.d.ts +7 -21
- package/dist/cjs/components/Popover/Popover.stories.js +4 -3
- package/dist/cjs/components/Popover/Popover.stories.js.map +1 -1
- package/dist/cjs/components/Progress/Progress.stories.d.ts +9 -56
- package/dist/cjs/components/Progress/Progress.stories.js +8 -4
- package/dist/cjs/components/Progress/Progress.stories.js.map +1 -1
- package/dist/cjs/components/Radio/Radio.stories.d.ts +11 -37
- package/dist/cjs/components/Radio/Radio.stories.js +8 -4
- package/dist/cjs/components/Radio/Radio.stories.js.map +1 -1
- package/dist/cjs/components/Radio/RadioButton.stories.d.ts +10 -23
- package/dist/cjs/components/Radio/RadioButton.stories.js +8 -4
- package/dist/cjs/components/Radio/RadioButton.stories.js.map +1 -1
- package/dist/cjs/components/SVG/SVG.stories.d.ts +6 -8
- package/dist/cjs/components/SVG/SVG.stories.js +3 -2
- package/dist/cjs/components/SVG/SVG.stories.js.map +1 -1
- package/dist/cjs/components/Segment/Segment.stories.d.ts +8 -30
- package/dist/cjs/components/Segment/Segment.stories.js +11 -10
- package/dist/cjs/components/Segment/Segment.stories.js.map +1 -1
- package/dist/cjs/components/Select/Select.stories.d.ts +10 -31
- package/dist/cjs/components/Select/Select.stories.js +6 -1
- package/dist/cjs/components/Select/Select.stories.js.map +1 -1
- package/dist/cjs/components/Slider/Slider.stories.d.ts +10 -13
- package/dist/cjs/components/Slider/Slider.stories.js +7 -3
- package/dist/cjs/components/Slider/Slider.stories.js.map +1 -1
- package/dist/cjs/components/Table/Table.stories.d.ts +6 -8
- package/dist/cjs/components/Table/Table.stories.js +2 -1
- package/dist/cjs/components/Table/Table.stories.js.map +1 -1
- package/dist/cjs/components/Text/Text.stories.d.ts +7 -11
- package/dist/cjs/components/Text/Text.stories.js +4 -3
- package/dist/cjs/components/Text/Text.stories.js.map +1 -1
- package/dist/cjs/components/TextArea/TextArea.stories.d.ts +11 -31
- package/dist/cjs/components/TextArea/TextArea.stories.js +7 -3
- package/dist/cjs/components/TextArea/TextArea.stories.js.map +1 -1
- package/dist/cjs/components/TextField/TextField.stories.d.ts +19 -45
- package/dist/cjs/components/TextField/TextField.stories.js +7 -3
- package/dist/cjs/components/TextField/TextField.stories.js.map +1 -1
- package/dist/cjs/components/Title/Title.stories.d.ts +6 -8
- package/dist/cjs/components/Title/Title.stories.js +2 -1
- package/dist/cjs/components/Title/Title.stories.js.map +1 -1
- package/dist/cjs/components/VisuallyHidden/VisuallyHidden.stories.d.ts +5 -7
- package/dist/cjs/components/VisuallyHidden/VisuallyHidden.stories.js +2 -1
- package/dist/cjs/components/VisuallyHidden/VisuallyHidden.stories.js.map +1 -1
- package/dist/cjs/hooks/useBreakpoint/useBreakpoint.stories.d.ts +6 -9
- package/dist/cjs/hooks/useBreakpoint/useBreakpoint.stories.js +3 -2
- package/dist/cjs/hooks/useBreakpoint/useBreakpoint.stories.js.map +1 -1
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/cjs/utils/StoryContainer.d.ts +1 -0
- package/dist/cjs/utils/StoryContainer.js +11 -0
- package/dist/cjs/utils/StoryContainer.js.map +1 -0
- package/dist/cjs/utils/index.d.ts +8 -0
- package/dist/cjs/utils/index.js +25 -0
- package/dist/cjs/utils/index.js.map +1 -0
- package/dist/esm/components/LoadingIndicator/LoadingIndicator.js.map +1 -1
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/esm/utils/StoryContainer.js +4 -0
- package/dist/esm/utils/StoryContainer.js.map +1 -0
- package/dist/esm/utils/index.js +9 -0
- package/dist/esm/utils/index.js.map +1 -0
- package/dist/mobius.d.ts +1 -6
- package/package.json +2 -2
- package/src/components/Accordion/Accordion.mdx +4 -4
- package/src/components/Accordion/Accordion.stories.tsx +19 -8
- package/src/components/Alert/Alert.mdx +1 -2
- package/src/components/Alert/Alert.stories.tsx +8 -4
- package/src/components/Box/Box.mdx +1 -3
- package/src/components/Box/Box.stories.tsx +9 -5
- package/src/components/Breadcrumbs/Breadcrumbs.mdx +0 -4
- package/src/components/Breadcrumbs/Breadcrumbs.stories.tsx +8 -4
- package/src/components/Button/Button.mdx +0 -2
- package/src/components/Button/Button.stories.tsx +19 -15
- package/src/components/Checkbox/Checkbox.mdx +0 -3
- package/src/components/Checkbox/Checkbox.stories.tsx +19 -8
- package/src/components/Checkbox/CheckboxGroup.mdx +1 -1
- package/src/components/Checkbox/CheckboxGroup.stories.tsx +18 -7
- package/src/components/Container/Container.mdx +0 -1
- package/src/components/Container/Container.stories.tsx +7 -3
- package/src/components/Divider/Divider.mdx +0 -2
- package/src/components/Divider/Divider.stories.tsx +15 -3
- package/src/components/Drawer/Drawer.stories.tsx +21 -17
- package/src/components/DropdownMenu/DropdownMenu.mdx +0 -1
- package/src/components/DropdownMenu/DropdownMenu.stories.tsx +26 -18
- package/src/components/ErrorMessage/ErrorMessage.mdx +1 -6
- package/src/components/ErrorMessage/ErrorMessage.stories.tsx +8 -4
- package/src/components/Fieldset/Fieldset.mdx +0 -2
- package/src/components/Fieldset/Fieldset.stories.tsx +16 -5
- package/src/components/Flex/Flex.mdx +0 -1
- package/src/components/Flex/Flex.stories.tsx +28 -24
- package/src/components/Grid/Grid.mdx +0 -2
- package/src/components/Grid/Grid.stories.tsx +44 -41
- package/src/components/Icon/Icon.stories.tsx +10 -6
- package/src/components/Image/Image.mdx +0 -1
- package/src/components/Image/Image.stories.tsx +9 -5
- package/src/components/Label/Label.mdx +0 -1
- package/src/components/Label/Label.stories.tsx +7 -3
- package/src/components/Link/Link.mdx +0 -1
- package/src/components/Link/Link.stories.tsx +9 -5
- package/src/components/LinkButton/LinkButton.mdx +0 -1
- package/src/components/LinkButton/LinkButton.stories.tsx +8 -4
- package/src/components/List/List.mdx +0 -2
- package/src/components/List/List.stories.tsx +12 -8
- package/src/components/LoadingIndicator/LoadingIndicator.mdx +0 -1
- package/src/components/LoadingIndicator/LoadingIndicator.stories.tsx +15 -14
- package/src/components/LoadingIndicator/LoadingIndicator.tsx +5 -8
- package/src/components/Logo/Logo.stories.tsx +9 -5
- package/src/components/Modal/Modal.stories.tsx +38 -34
- package/src/components/NumberField/NumberField.stories.tsx +19 -8
- package/src/components/PasswordField/PasswordField.mdx +0 -3
- package/src/components/PasswordField/PasswordField.stories.tsx +15 -4
- package/src/components/Popover/Popover.stories.tsx +10 -6
- package/src/components/Progress/Progress.mdx +1 -2
- package/src/components/Progress/Progress.stories.tsx +23 -12
- package/src/components/Radio/Radio.mdx +0 -5
- package/src/components/Radio/Radio.stories.tsx +22 -11
- package/src/components/Radio/RadioButton.mdx +0 -5
- package/src/components/Radio/RadioButton.stories.tsx +21 -10
- package/src/components/SVG/SVG.mdx +0 -1
- package/src/components/SVG/SVG.stories.tsx +11 -7
- package/src/components/Segment/Segment.mdx +0 -12
- package/src/components/Segment/Segment.stories.tsx +18 -14
- package/src/components/Select/Select.mdx +0 -4
- package/src/components/Select/Select.stories.tsx +19 -7
- package/src/components/Slider/Slider.mdx +0 -2
- package/src/components/Slider/Slider.stories.tsx +22 -17
- package/src/components/Table/Table.mdx +0 -1
- package/src/components/Table/Table.stories.tsx +8 -4
- package/src/components/Text/Text.mdx +1 -2
- package/src/components/Text/Text.stories.tsx +9 -5
- package/src/components/TextArea/TextArea.mdx +0 -1
- package/src/components/TextArea/TextArea.stories.tsx +20 -9
- package/src/components/TextField/TextField.mdx +0 -3
- package/src/components/TextField/TextField.stories.tsx +28 -17
- package/src/components/Title/Title.mdx +1 -2
- package/src/components/Title/Title.stories.tsx +7 -3
- package/src/components/VisuallyHidden/VisuallyHidden.mdx +1 -3
- package/src/components/VisuallyHidden/VisuallyHidden.stories.tsx +7 -3
- package/src/hooks/useBreakpoint/useBreakpoint.stories.tsx +9 -5
- package/src/styles.d.ts +2 -0
- package/src/utils/StoryContainer.module.css +13 -0
- package/src/utils/StoryContainer.tsx +5 -0
- package/src/utils/index.ts +8 -0
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import type { Meta } from "@storybook/react";
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { cross, tick } from "@simplybusiness/icons";
|
|
3
3
|
import { Icon, Text } from "../index";
|
|
4
4
|
import { List, ListItem, ListProps } from ".";
|
|
5
|
-
import { excludeControls } from "../../utils
|
|
5
|
+
import { excludeControls } from "../../utils";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
type StoryType = StoryObj<typeof List>;
|
|
8
|
+
|
|
9
|
+
const meta: Meta<typeof List> = {
|
|
8
10
|
title: "Components/List",
|
|
9
11
|
component: List,
|
|
10
12
|
argTypes: {
|
|
@@ -29,7 +31,7 @@ export default {
|
|
|
29
31
|
},
|
|
30
32
|
};
|
|
31
33
|
|
|
32
|
-
export const Unordered:
|
|
34
|
+
export const Unordered: StoryType = {
|
|
33
35
|
render: (args: ListProps) => (
|
|
34
36
|
<List {...args}>
|
|
35
37
|
<ListItem>Foo</ListItem>
|
|
@@ -44,7 +46,7 @@ export const Unordered: Meta<typeof List> = {
|
|
|
44
46
|
},
|
|
45
47
|
};
|
|
46
48
|
|
|
47
|
-
export const Ordered:
|
|
49
|
+
export const Ordered: StoryType = {
|
|
48
50
|
render: (args: ListProps) => (
|
|
49
51
|
<List {...args}>
|
|
50
52
|
<ListItem>Foo</ListItem>
|
|
@@ -59,7 +61,7 @@ export const Ordered: Meta<typeof List> = {
|
|
|
59
61
|
},
|
|
60
62
|
};
|
|
61
63
|
|
|
62
|
-
export const StartingFromASpecificNumber:
|
|
64
|
+
export const StartingFromASpecificNumber: StoryType = {
|
|
63
65
|
render: (args: ListProps) => (
|
|
64
66
|
<List {...args}>
|
|
65
67
|
<ListItem>Foo</ListItem>
|
|
@@ -79,7 +81,7 @@ export const StartingFromASpecificNumber: Meta<typeof List> = {
|
|
|
79
81
|
},
|
|
80
82
|
};
|
|
81
83
|
|
|
82
|
-
export const Reversed:
|
|
84
|
+
export const Reversed: StoryType = {
|
|
83
85
|
render: (args: ListProps) => (
|
|
84
86
|
<List {...args}>
|
|
85
87
|
<ListItem>Foo</ListItem>
|
|
@@ -99,7 +101,7 @@ export const Reversed: Meta<typeof List> = {
|
|
|
99
101
|
},
|
|
100
102
|
};
|
|
101
103
|
|
|
102
|
-
export const WithCustomIcons:
|
|
104
|
+
export const WithCustomIcons: StoryType = {
|
|
103
105
|
render: (args: ListProps) => (
|
|
104
106
|
<List {...args}>
|
|
105
107
|
<ListItem>
|
|
@@ -134,3 +136,5 @@ export const WithCustomIcons: Meta<typeof List> = {
|
|
|
134
136
|
},
|
|
135
137
|
},
|
|
136
138
|
};
|
|
139
|
+
|
|
140
|
+
export default meta;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Meta, ArgTypes, Story } from "@storybook/blocks";
|
|
2
2
|
import { LoadingIndicator } from "./LoadingIndicator";
|
|
3
|
-
import { excludeControls } from "../../utils/excludeControls";
|
|
4
3
|
import * as LoadingIndicatorStories from "./LoadingIndicator.stories";
|
|
5
4
|
|
|
6
5
|
<Meta of={LoadingIndicatorStories} />
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { home, loading, refreshArrow } from "@simplybusiness/icons";
|
|
2
|
-
import type { Meta } from "@storybook/react";
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
3
3
|
import { LoadingIndicator, LoadingIndicatorProps } from "./LoadingIndicator";
|
|
4
4
|
|
|
5
5
|
const iconOptions = { loading, refreshArrow, home };
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
type StoryType = StoryObj<typeof LoadingIndicator>;
|
|
8
|
+
|
|
9
|
+
const meta: Meta<typeof LoadingIndicator> = {
|
|
8
10
|
title: "Components/LoadingIndicator",
|
|
9
11
|
component: LoadingIndicator,
|
|
10
12
|
argTypes: {
|
|
@@ -17,41 +19,40 @@ export default {
|
|
|
17
19
|
options: ["darkcyan", "deeppink", "royalblue", "tomato"],
|
|
18
20
|
control: { type: "radio" },
|
|
19
21
|
},
|
|
20
|
-
fontSize: {
|
|
21
|
-
options: ["72px", "48px", "24px"],
|
|
22
|
-
control: { type: "radio" },
|
|
23
|
-
},
|
|
24
22
|
},
|
|
25
23
|
};
|
|
26
24
|
|
|
27
|
-
export const Normal:
|
|
25
|
+
export const Normal: StoryType = {
|
|
28
26
|
render: (args: LoadingIndicatorProps) => <LoadingIndicator {...args} />,
|
|
29
27
|
args: {
|
|
30
28
|
icon: loading,
|
|
31
|
-
|
|
29
|
+
size: "md",
|
|
32
30
|
},
|
|
33
31
|
};
|
|
34
32
|
|
|
35
|
-
export const Large:
|
|
33
|
+
export const Large: StoryType = {
|
|
36
34
|
render: (args: LoadingIndicatorProps) => <LoadingIndicator {...args} />,
|
|
37
35
|
args: {
|
|
38
36
|
icon: loading,
|
|
39
|
-
|
|
37
|
+
size: "lg",
|
|
40
38
|
},
|
|
41
39
|
};
|
|
42
40
|
|
|
43
|
-
export const WithCustomColour:
|
|
41
|
+
export const WithCustomColour: StoryType = {
|
|
44
42
|
render: (args: LoadingIndicatorProps) => <LoadingIndicator {...args} />,
|
|
45
43
|
args: {
|
|
46
44
|
icon: loading,
|
|
47
|
-
|
|
45
|
+
size: "md",
|
|
46
|
+
color: "tomato",
|
|
48
47
|
},
|
|
49
48
|
};
|
|
50
49
|
|
|
51
|
-
export const WithCustomIcon:
|
|
50
|
+
export const WithCustomIcon: StoryType = {
|
|
52
51
|
render: (args: LoadingIndicatorProps) => <LoadingIndicator {...args} />,
|
|
53
52
|
args: {
|
|
54
53
|
icon: refreshArrow,
|
|
55
|
-
|
|
54
|
+
size: "md",
|
|
56
55
|
},
|
|
57
56
|
};
|
|
57
|
+
|
|
58
|
+
export default meta;
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import { Ref, forwardRef, RefAttributes } from "react";
|
|
2
2
|
import classNames from "classnames/dedupe";
|
|
3
|
-
import { loading
|
|
3
|
+
import { loading } from "@simplybusiness/icons";
|
|
4
4
|
import { ForwardedRefComponent } from "../../types/components";
|
|
5
|
-
import { Icon } from "../Icon";
|
|
5
|
+
import { Icon, IconProps } from "../Icon";
|
|
6
6
|
|
|
7
|
-
export interface LoadingIndicatorProps
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
fontSize?: string;
|
|
11
|
-
color?: string;
|
|
12
|
-
}
|
|
7
|
+
export interface LoadingIndicatorProps
|
|
8
|
+
extends RefAttributes<SVGSVGElement>,
|
|
9
|
+
IconProps {}
|
|
13
10
|
|
|
14
11
|
export type LoadingIndicatorRef = Ref<SVGSVGElement>;
|
|
15
12
|
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import type { Meta } from "@storybook/react";
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { Logo, LogoProps } from "..";
|
|
3
|
-
import { excludeControls } from "../../utils
|
|
3
|
+
import { excludeControls } from "../../utils";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
type StoryType = StoryObj<typeof Logo>;
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof Logo> = {
|
|
6
8
|
title: "Components/Logo",
|
|
7
9
|
component: Logo,
|
|
8
10
|
argTypes: {
|
|
@@ -12,11 +14,13 @@ export default {
|
|
|
12
14
|
...excludeControls("height"),
|
|
13
15
|
},
|
|
14
16
|
args: {
|
|
15
|
-
width: 144,
|
|
17
|
+
width: "144",
|
|
16
18
|
},
|
|
17
19
|
};
|
|
18
20
|
|
|
19
|
-
export const Normal:
|
|
21
|
+
export const Normal: StoryType = {
|
|
20
22
|
render: (args: LogoProps) => <Logo {...args} />,
|
|
21
23
|
args: {},
|
|
22
24
|
};
|
|
25
|
+
|
|
26
|
+
export default meta;
|
|
@@ -1,10 +1,39 @@
|
|
|
1
|
-
import type { Meta } from "@storybook/react";
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import { Modal, ModalProps } from ".";
|
|
4
|
-
import { excludeControls } from "../../utils
|
|
4
|
+
import { excludeControls } from "../../utils";
|
|
5
5
|
import { Button } from "../Button";
|
|
6
6
|
import { Text } from "../Text";
|
|
7
7
|
|
|
8
|
+
type StoryType = StoryObj<typeof Modal>;
|
|
9
|
+
|
|
10
|
+
const meta: Meta<typeof Modal> = {
|
|
11
|
+
title: "Components/Modal",
|
|
12
|
+
component: Modal,
|
|
13
|
+
argTypes: {
|
|
14
|
+
animation: {
|
|
15
|
+
options: ["slideUp", "fade", "neither"],
|
|
16
|
+
control: { type: "radio" },
|
|
17
|
+
mapping: {
|
|
18
|
+
slideUp: "slideUp",
|
|
19
|
+
fade: "fade",
|
|
20
|
+
neither: undefined,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
...excludeControls(
|
|
24
|
+
"appElement",
|
|
25
|
+
"parentSelector",
|
|
26
|
+
"isOpen",
|
|
27
|
+
"preventCloseOnEsc",
|
|
28
|
+
"shouldFocusAfterRender",
|
|
29
|
+
"size",
|
|
30
|
+
),
|
|
31
|
+
},
|
|
32
|
+
args: {
|
|
33
|
+
isFullScreen: false,
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
|
|
8
37
|
const Demo = (props: ModalProps) => {
|
|
9
38
|
const [open, setOpen] = useState(false);
|
|
10
39
|
return (
|
|
@@ -213,34 +242,7 @@ const WithNestedDemo = ({ animation, closeLabel }: ModalProps) => {
|
|
|
213
242
|
);
|
|
214
243
|
};
|
|
215
244
|
|
|
216
|
-
export
|
|
217
|
-
title: "Components/Modal",
|
|
218
|
-
component: Modal,
|
|
219
|
-
argTypes: {
|
|
220
|
-
animation: {
|
|
221
|
-
options: ["slideUp", "fade", "neither"],
|
|
222
|
-
control: { type: "radio" },
|
|
223
|
-
mapping: {
|
|
224
|
-
slideUp: "slideUp",
|
|
225
|
-
fade: "fade",
|
|
226
|
-
neither: undefined,
|
|
227
|
-
},
|
|
228
|
-
},
|
|
229
|
-
...excludeControls(
|
|
230
|
-
"appElement",
|
|
231
|
-
"parentSelector",
|
|
232
|
-
"isOpen",
|
|
233
|
-
"preventCloseOnEsc",
|
|
234
|
-
"shouldFocusAfterRender",
|
|
235
|
-
"size",
|
|
236
|
-
),
|
|
237
|
-
},
|
|
238
|
-
args: {
|
|
239
|
-
isFullScreen: false,
|
|
240
|
-
},
|
|
241
|
-
};
|
|
242
|
-
|
|
243
|
-
export const Normal: Meta<typeof Demo> = {
|
|
245
|
+
export const Normal: StoryType = {
|
|
244
246
|
render: (args: ModalProps) => <Demo {...args} />,
|
|
245
247
|
args: {
|
|
246
248
|
isOpen: false,
|
|
@@ -248,7 +250,7 @@ export const Normal: Meta<typeof Demo> = {
|
|
|
248
250
|
},
|
|
249
251
|
};
|
|
250
252
|
|
|
251
|
-
export const FullScreen:
|
|
253
|
+
export const FullScreen: StoryType = {
|
|
252
254
|
render: (args: ModalProps) => <FullScreenDemo {...args} />,
|
|
253
255
|
args: {
|
|
254
256
|
isOpen: false,
|
|
@@ -257,7 +259,7 @@ export const FullScreen: Meta<typeof FullScreenDemo> = {
|
|
|
257
259
|
},
|
|
258
260
|
};
|
|
259
261
|
|
|
260
|
-
export const WithAnimation:
|
|
262
|
+
export const WithAnimation: StoryType = {
|
|
261
263
|
render: (args: ModalProps) => <WithAnimationDemo {...args} />,
|
|
262
264
|
args: {
|
|
263
265
|
isOpen: false,
|
|
@@ -266,7 +268,7 @@ export const WithAnimation: Meta<typeof WithAnimationDemo> = {
|
|
|
266
268
|
},
|
|
267
269
|
};
|
|
268
270
|
|
|
269
|
-
export const WithLongContent:
|
|
271
|
+
export const WithLongContent: StoryType = {
|
|
270
272
|
render: (args: ModalProps) => <WithLongContentDemo {...args} />,
|
|
271
273
|
args: {
|
|
272
274
|
isOpen: false,
|
|
@@ -274,10 +276,12 @@ export const WithLongContent: Meta<typeof WithLongContentDemo> = {
|
|
|
274
276
|
},
|
|
275
277
|
};
|
|
276
278
|
|
|
277
|
-
export const WithNested:
|
|
279
|
+
export const WithNested: StoryType = {
|
|
278
280
|
render: (args: ModalProps) => <WithNestedDemo {...args} />,
|
|
279
281
|
args: {
|
|
280
282
|
isOpen: false,
|
|
281
283
|
closeLabel: "Close",
|
|
282
284
|
},
|
|
283
285
|
};
|
|
286
|
+
|
|
287
|
+
export default meta;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import type { Meta } from "@storybook/react";
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { NumberField, NumberFieldProps } from "./NumberField";
|
|
3
|
-
import { excludeControls } from "../../utils
|
|
3
|
+
import { StoryContainer, excludeControls } from "../../utils";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
type StoryType = StoryObj<typeof NumberField>;
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof NumberField> = {
|
|
6
8
|
title: "Forms/NumberField",
|
|
7
9
|
component: NumberField,
|
|
8
10
|
argTypes: {
|
|
@@ -40,9 +42,16 @@ export default {
|
|
|
40
42
|
isDisabled: false,
|
|
41
43
|
isReadOnly: false,
|
|
42
44
|
},
|
|
45
|
+
decorators: [
|
|
46
|
+
Story => (
|
|
47
|
+
<StoryContainer>
|
|
48
|
+
<Story />
|
|
49
|
+
</StoryContainer>
|
|
50
|
+
),
|
|
51
|
+
],
|
|
43
52
|
};
|
|
44
53
|
|
|
45
|
-
export const Normal:
|
|
54
|
+
export const Normal: StoryType = {
|
|
46
55
|
render: (args: NumberFieldProps) => <NumberField {...args} />,
|
|
47
56
|
args: {
|
|
48
57
|
label: "Number field",
|
|
@@ -53,7 +62,7 @@ export const Normal: Meta<typeof NumberField> = {
|
|
|
53
62
|
},
|
|
54
63
|
};
|
|
55
64
|
|
|
56
|
-
export const LimitedRange:
|
|
65
|
+
export const LimitedRange: StoryType = {
|
|
57
66
|
render: (args: NumberFieldProps) => <NumberField {...args} />,
|
|
58
67
|
args: {
|
|
59
68
|
label: "Number field",
|
|
@@ -66,7 +75,7 @@ export const LimitedRange: Meta<typeof NumberField> = {
|
|
|
66
75
|
},
|
|
67
76
|
};
|
|
68
77
|
|
|
69
|
-
export const Valid:
|
|
78
|
+
export const Valid: StoryType = {
|
|
70
79
|
render: (args: NumberFieldProps) => <NumberField {...args} />,
|
|
71
80
|
args: {
|
|
72
81
|
label: "Number field",
|
|
@@ -78,7 +87,7 @@ export const Valid: Meta<typeof NumberField> = {
|
|
|
78
87
|
},
|
|
79
88
|
};
|
|
80
89
|
|
|
81
|
-
export const Invalid:
|
|
90
|
+
export const Invalid: StoryType = {
|
|
82
91
|
render: (args: NumberFieldProps) => <NumberField {...args} />,
|
|
83
92
|
args: {
|
|
84
93
|
label: "Number field",
|
|
@@ -90,7 +99,7 @@ export const Invalid: Meta<typeof NumberField> = {
|
|
|
90
99
|
},
|
|
91
100
|
};
|
|
92
101
|
|
|
93
|
-
export const Disabled:
|
|
102
|
+
export const Disabled: StoryType = {
|
|
94
103
|
render: (args: NumberFieldProps) => <NumberField {...args} />,
|
|
95
104
|
args: {
|
|
96
105
|
label: "Number field",
|
|
@@ -101,3 +110,5 @@ export const Disabled: Meta<typeof NumberField> = {
|
|
|
101
110
|
isRequired: false,
|
|
102
111
|
},
|
|
103
112
|
};
|
|
113
|
+
|
|
114
|
+
export default meta;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { useState } from "react";
|
|
2
1
|
import { Meta, ArgTypes, Canvas } from "@storybook/blocks";
|
|
3
2
|
import { PasswordField } from "./PasswordField";
|
|
4
|
-
import { Label, Segment, SegmentGroup } from "..";
|
|
5
|
-
import { excludeControls } from "../../utils/excludeControls";
|
|
6
3
|
import * as PasswordFieldStories from "./PasswordField.stories";
|
|
7
4
|
|
|
8
5
|
<Meta of={PasswordFieldStories} />
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import type { Meta } from "@storybook/react";
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { PasswordField, PasswordFieldProps } from "./PasswordField";
|
|
3
|
-
import { excludeControls } from "../../utils
|
|
3
|
+
import { StoryContainer, excludeControls } from "../../utils";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
type StoryType = StoryObj<typeof PasswordField>;
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof PasswordField> = {
|
|
6
8
|
title: "Forms/PasswordField",
|
|
7
9
|
component: PasswordField,
|
|
8
10
|
argTypes: {
|
|
@@ -24,9 +26,16 @@ export default {
|
|
|
24
26
|
args: {
|
|
25
27
|
isReadOnly: false,
|
|
26
28
|
},
|
|
29
|
+
decorators: [
|
|
30
|
+
Story => (
|
|
31
|
+
<StoryContainer>
|
|
32
|
+
<Story />
|
|
33
|
+
</StoryContainer>
|
|
34
|
+
),
|
|
35
|
+
],
|
|
27
36
|
};
|
|
28
37
|
|
|
29
|
-
export const Normal:
|
|
38
|
+
export const Normal: StoryType = {
|
|
30
39
|
render: (args: PasswordFieldProps) => <PasswordField {...args} />,
|
|
31
40
|
args: {
|
|
32
41
|
label: "Password",
|
|
@@ -37,3 +46,5 @@ export const Normal: Meta<typeof PasswordField> = {
|
|
|
37
46
|
isRequired: false,
|
|
38
47
|
},
|
|
39
48
|
};
|
|
49
|
+
|
|
50
|
+
export default meta;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import type { Meta } from "@storybook/react";
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { Ref, forwardRef } from "react";
|
|
3
3
|
import { Button, Flex, Popover, PopoverProps } from "..";
|
|
4
|
-
import { excludeControls } from "../../utils
|
|
4
|
+
import { excludeControls } from "../../utils";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
type StoryType = StoryObj<typeof Popover>;
|
|
7
|
+
|
|
8
|
+
const meta: Meta<typeof Popover> = {
|
|
7
9
|
title: "Components/Popover",
|
|
8
10
|
component: Popover,
|
|
9
11
|
argTypes: {
|
|
@@ -17,7 +19,7 @@ export default {
|
|
|
17
19
|
return <Story />;
|
|
18
20
|
},
|
|
19
21
|
],
|
|
20
|
-
}
|
|
22
|
+
};
|
|
21
23
|
|
|
22
24
|
type QuestionIconProps = {};
|
|
23
25
|
|
|
@@ -57,7 +59,7 @@ const QuestionIcon = forwardRef(
|
|
|
57
59
|
),
|
|
58
60
|
);
|
|
59
61
|
|
|
60
|
-
export const Normal:
|
|
62
|
+
export const Normal: StoryType = {
|
|
61
63
|
render: (args: PopoverProps) => <Popover {...args} />,
|
|
62
64
|
args: {
|
|
63
65
|
children: <>No way! Now I know everything I need to 🚀.</>,
|
|
@@ -65,7 +67,7 @@ export const Normal: Meta<typeof Popover> = {
|
|
|
65
67
|
},
|
|
66
68
|
};
|
|
67
69
|
|
|
68
|
-
export const CustomTrigger:
|
|
70
|
+
export const CustomTrigger: StoryType = {
|
|
69
71
|
render: () => (
|
|
70
72
|
<div className="popover-example">
|
|
71
73
|
<Popover
|
|
@@ -85,3 +87,5 @@ export const CustomTrigger: Meta<typeof Popover> = {
|
|
|
85
87
|
</div>
|
|
86
88
|
),
|
|
87
89
|
};
|
|
90
|
+
|
|
91
|
+
export default meta;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Meta, ArgTypes, Canvas } from "@storybook/blocks";
|
|
2
|
-
import { Progress
|
|
3
|
-
import { excludeControls } from "../../utils/excludeControls";
|
|
2
|
+
import { Progress } from "./Progress";
|
|
4
3
|
import * as ProgressStories from "./Progress.stories";
|
|
5
4
|
|
|
6
5
|
<Meta of={ProgressStories} />
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import type { Meta } from "@storybook/react";
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { Progress, ProgressProps } from "./Progress";
|
|
3
|
-
import { excludeControls } from "../../utils
|
|
3
|
+
import { StoryContainer, excludeControls } from "../../utils";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
value: number,
|
|
7
|
-
minValue: number,
|
|
8
|
-
maxValue: number,
|
|
9
|
-
) => `Step ${value} of ${maxValue}`;
|
|
5
|
+
type StoryType = StoryObj<typeof Progress>;
|
|
10
6
|
|
|
11
|
-
|
|
7
|
+
const meta: Meta<typeof Progress> = {
|
|
12
8
|
title: "Components/Progress",
|
|
13
9
|
component: Progress,
|
|
14
10
|
argTypes: {
|
|
@@ -47,9 +43,22 @@ export default {
|
|
|
47
43
|
},
|
|
48
44
|
...excludeControls("valueFormatter"),
|
|
49
45
|
},
|
|
46
|
+
decorators: [
|
|
47
|
+
Story => (
|
|
48
|
+
<StoryContainer>
|
|
49
|
+
<Story />
|
|
50
|
+
</StoryContainer>
|
|
51
|
+
),
|
|
52
|
+
],
|
|
50
53
|
};
|
|
51
54
|
|
|
52
|
-
|
|
55
|
+
const customValueFormatter = (
|
|
56
|
+
value: number,
|
|
57
|
+
minValue: number,
|
|
58
|
+
maxValue: number,
|
|
59
|
+
) => `Step ${value} of ${maxValue}`;
|
|
60
|
+
|
|
61
|
+
export const Primary: StoryType = {
|
|
53
62
|
render: (args: ProgressProps) => <Progress {...args} />,
|
|
54
63
|
args: {
|
|
55
64
|
value: 2,
|
|
@@ -61,7 +70,7 @@ export const Primary: Meta<typeof Progress> = {
|
|
|
61
70
|
},
|
|
62
71
|
};
|
|
63
72
|
|
|
64
|
-
export const Secondary:
|
|
73
|
+
export const Secondary: StoryType = {
|
|
65
74
|
render: (args: ProgressProps) => <Progress {...args} />,
|
|
66
75
|
args: {
|
|
67
76
|
value: 2,
|
|
@@ -73,7 +82,7 @@ export const Secondary: Meta<typeof Progress> = {
|
|
|
73
82
|
},
|
|
74
83
|
};
|
|
75
84
|
|
|
76
|
-
export const NoVisibleLabel:
|
|
85
|
+
export const NoVisibleLabel: StoryType = {
|
|
77
86
|
render: (args: ProgressProps) => <Progress {...args} />,
|
|
78
87
|
args: {
|
|
79
88
|
value: 1,
|
|
@@ -91,7 +100,7 @@ export const NoVisibleLabel: Meta<typeof Progress> = {
|
|
|
91
100
|
},
|
|
92
101
|
};
|
|
93
102
|
|
|
94
|
-
export const CustomValueFormat:
|
|
103
|
+
export const CustomValueFormat: StoryType = {
|
|
95
104
|
render: (args: ProgressProps) => <Progress {...args} />,
|
|
96
105
|
args: {
|
|
97
106
|
value: 1,
|
|
@@ -103,3 +112,5 @@ export const CustomValueFormat: Meta<typeof Progress> = {
|
|
|
103
112
|
valueFormatter: customValueFormatter,
|
|
104
113
|
},
|
|
105
114
|
};
|
|
115
|
+
|
|
116
|
+
export default meta;
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import { Fragment, useState } from "react";
|
|
2
1
|
import { Meta, ArgTypes, Canvas, Story } from "@storybook/blocks";
|
|
3
2
|
import { Radio } from "./Radio";
|
|
4
3
|
import { RadioGroup } from "./RadioGroup";
|
|
5
|
-
import { Flex } from "../Flex";
|
|
6
|
-
import { Divider } from "../Divider";
|
|
7
|
-
import { Box } from "../Box";
|
|
8
|
-
import { excludeControls } from "../../utils/excludeControls";
|
|
9
4
|
import * as RadioStories from "./Radio.stories";
|
|
10
5
|
|
|
11
6
|
<Meta of={RadioStories} />
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import type { Meta } from "@storybook/react";
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
2
|
import { Radio } from "./Radio";
|
|
3
3
|
import { RadioGroup, RadioGroupProps } from "./RadioGroup";
|
|
4
4
|
import { Flex } from "../Flex";
|
|
5
5
|
import { Divider } from "../Divider";
|
|
6
|
-
import { excludeControls } from "../../utils
|
|
6
|
+
import { StoryContainer, excludeControls } from "../../utils";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
type StoryType = StoryObj<typeof RadioGroup>;
|
|
9
|
+
|
|
10
|
+
const meta: Meta<typeof RadioGroup> = {
|
|
9
11
|
title: "Forms/Radio",
|
|
10
|
-
component:
|
|
12
|
+
component: RadioGroup,
|
|
11
13
|
argTypes: {
|
|
12
14
|
validationState: {
|
|
13
15
|
options: ["valid", "invalid", "neither"],
|
|
@@ -34,9 +36,16 @@ export default {
|
|
|
34
36
|
"value",
|
|
35
37
|
),
|
|
36
38
|
},
|
|
39
|
+
decorators: [
|
|
40
|
+
Story => (
|
|
41
|
+
<StoryContainer>
|
|
42
|
+
<Story />
|
|
43
|
+
</StoryContainer>
|
|
44
|
+
),
|
|
45
|
+
],
|
|
37
46
|
};
|
|
38
47
|
|
|
39
|
-
export const Normal:
|
|
48
|
+
export const Normal: StoryType = {
|
|
40
49
|
render: (args: RadioGroupProps) => (
|
|
41
50
|
<RadioGroup {...args}>
|
|
42
51
|
<Radio value="red" label="Red" />
|
|
@@ -53,7 +62,7 @@ export const Normal: Meta<typeof RadioGroup> = {
|
|
|
53
62
|
},
|
|
54
63
|
};
|
|
55
64
|
|
|
56
|
-
export const Disabled:
|
|
65
|
+
export const Disabled: StoryType = {
|
|
57
66
|
render: (args: RadioGroupProps) => (
|
|
58
67
|
<RadioGroup {...args}>
|
|
59
68
|
<Radio value="red" label="Red" isDisabled />
|
|
@@ -69,7 +78,7 @@ export const Disabled: Meta<typeof RadioGroup> = {
|
|
|
69
78
|
},
|
|
70
79
|
};
|
|
71
80
|
|
|
72
|
-
export const DisabledIndividualRadios:
|
|
81
|
+
export const DisabledIndividualRadios: StoryType = {
|
|
73
82
|
render: (args: RadioGroupProps) => (
|
|
74
83
|
<RadioGroup {...args}>
|
|
75
84
|
<Radio value="red" label="Red" isDisabled />
|
|
@@ -85,7 +94,7 @@ export const DisabledIndividualRadios: Meta<typeof RadioGroup> = {
|
|
|
85
94
|
},
|
|
86
95
|
};
|
|
87
96
|
|
|
88
|
-
export const Valid:
|
|
97
|
+
export const Valid: StoryType = {
|
|
89
98
|
render: (args: RadioGroupProps) => (
|
|
90
99
|
<RadioGroup {...args}>
|
|
91
100
|
<Radio value="red" label="Red" />
|
|
@@ -102,7 +111,7 @@ export const Valid: Meta<typeof RadioGroup> = {
|
|
|
102
111
|
},
|
|
103
112
|
};
|
|
104
113
|
|
|
105
|
-
export const Invalid:
|
|
114
|
+
export const Invalid: StoryType = {
|
|
106
115
|
render: (args: RadioGroupProps) => (
|
|
107
116
|
<RadioGroup {...args}>
|
|
108
117
|
<Radio value="red" label="Red" />
|
|
@@ -119,7 +128,7 @@ export const Invalid: Meta<typeof RadioGroup> = {
|
|
|
119
128
|
},
|
|
120
129
|
};
|
|
121
130
|
|
|
122
|
-
export const ComplexLabel:
|
|
131
|
+
export const ComplexLabel: StoryType = {
|
|
123
132
|
render: (args: RadioGroupProps) => (
|
|
124
133
|
<RadioGroup {...args}>
|
|
125
134
|
<Radio value="annual" label="Pay annually">
|
|
@@ -183,7 +192,7 @@ export const ComplexLabel: Meta<typeof RadioGroup> = {
|
|
|
183
192
|
},
|
|
184
193
|
};
|
|
185
194
|
|
|
186
|
-
export const HorizontalLayout:
|
|
195
|
+
export const HorizontalLayout: StoryType = {
|
|
187
196
|
render: (args: RadioGroupProps) => (
|
|
188
197
|
<RadioGroup {...args}>
|
|
189
198
|
<Radio value="red" label="Red" />
|
|
@@ -198,3 +207,5 @@ export const HorizontalLayout: Meta<typeof RadioGroup> = {
|
|
|
198
207
|
orientation: "horizontal",
|
|
199
208
|
},
|
|
200
209
|
};
|
|
210
|
+
|
|
211
|
+
export default meta;
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import { Fragment, useState } from "react";
|
|
2
1
|
import { Meta, ArgTypes, Canvas } from "@storybook/blocks";
|
|
3
2
|
import { RadioButton } from "./RadioButton";
|
|
4
3
|
import { RadioGroup } from "./RadioGroup";
|
|
5
|
-
import { Flex } from "../Flex";
|
|
6
|
-
import { Box } from "../Box";
|
|
7
|
-
import { Icon } from "../Icon";
|
|
8
|
-
import { excludeControls } from "../../utils/excludeControls";
|
|
9
4
|
import * as RadioButtonStories from "./RadioButton.stories";
|
|
10
5
|
|
|
11
6
|
<Meta of={RadioButtonStories} />
|