Skip to content

Commit 8703a38

Browse files
feat(docs): arg types added
1 parent 01c445a commit 8703a38

File tree

5 files changed

+82
-13
lines changed

5 files changed

+82
-13
lines changed

packages/docs/src/stories/Avatar.stories.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,14 @@ export default {
55
title: "Data display/Avatar",
66
component: Avatar,
77
args: {
8-
src: 'https://github.com/robsonnatanael.png',
8+
src: "https://github.com/robsonnatanael.png",
9+
},
10+
argTypes: {
11+
src: {
12+
control: {
13+
type: 'text',
14+
},
15+
},
916
},
1017
} as Meta<AvatarProps>;
1118

packages/docs/src/stories/Box.stories.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ export default {
99
<Text>Testando o elemento Box</Text>
1010
)
1111
},
12+
argTypes: {
13+
children: {
14+
control: {
15+
type: null
16+
}
17+
}
18+
}
1219
} as Meta<BoxProps>;
1320

1421
export const Primary: StoryObj<BoxProps> = {};

packages/docs/src/stories/Button.stories.tsx

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,32 @@ export default {
66
title: "Form/Button",
77
component: Button,
88
args: {
9-
children: 'Send'
9+
children: "Send",
10+
variant: 'primary',
11+
size: 'md',
12+
disabled: false
1013
},
1114
argTypes: {
15+
variant: {
16+
options: ["primary", "secondary", "tertiary"],
17+
control: {
18+
type: "inline-radio",
19+
},
20+
},
21+
size: {
22+
options: ["sm", "md"],
23+
control: {
24+
type: "inline-radio",
25+
},
26+
},
27+
disabled: {
28+
control: {
29+
type: 'boolean'
30+
}
31+
},
1232
onClick: {
13-
action: 'click'
14-
}
33+
action: "click",
34+
},
1535
},
1636
} as Meta<ButtonProps>;
1737

packages/docs/src/stories/Heading.stories.tsx

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,33 @@ export default {
55
title: "Typography/Heading",
66
component: Heading,
77
args: {
8-
children: 'Custom title',
8+
children: "Custom title",
9+
size: 'md'
10+
},
11+
argTypes: {
12+
size: {
13+
options: ["sm", "md", "lg", "2xl", "4xl", "5xl", "6xl"],
14+
control: {
15+
type: "inline-radio",
16+
},
17+
},
918
},
1019
} as Meta<HeadingProps>;
1120

1221
export const Primary: StoryObj<HeadingProps> = {};
1322

1423
export const CustomTag: StoryObj<HeadingProps> = {
1524
args: {
16-
children: 'H1 Heading',
17-
as: 'h1'
25+
children: "H1 Heading",
26+
as: "h1",
1827
},
28+
1929
parameters: {
2030
docs: {
2131
description: {
22-
story: 'Por padrão o heading sempre será um `h2`, mas podemos alterar isso com a propriedade `as`.'
23-
}
24-
}
25-
}
26-
}
32+
story:
33+
"Por padrão o heading sempre será um `h2`, mas podemos alterar isso com a propriedade `as`.",
34+
},
35+
},
36+
},
37+
};

packages/docs/src/stories/Text.stories.tsx

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,31 @@ export default {
55
title: "Typography/Text",
66
component: Text,
77
args: {
8-
children: 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Earum, libero officia? Eveniet consectetur magnam sapiente, qui mollitia dolores ullam quisquam! Mollitia maxime rem, impedit a nam excepturi quia perspiciatis sequi?',
8+
children:
9+
"Lorem ipsum dolor sit amet consectetur adipisicing elit. Earum, libero officia? Eveniet consectetur magnam sapiente, qui mollitia dolores ullam quisquam! Mollitia maxime rem, impedit a nam excepturi quia perspiciatis sequi?",
10+
size: 'md'
11+
},
12+
argTypes: {
13+
size: {
14+
options: [
15+
"xxs",
16+
"xs",
17+
"sm",
18+
"md",
19+
"lg",
20+
"xl",
21+
"2xl",
22+
"4xl",
23+
"5xl",
24+
"6xl",
25+
"7xl",
26+
"8xl",
27+
"9xl",
28+
],
29+
control: {
30+
type: 'inline-radio'
31+
}
32+
},
933
},
1034
} as Meta<TextProps>;
1135

0 commit comments

Comments
 (0)