Skip to content

Commit c669edb

Browse files
committed
feat(react): ✨ Adição de botões Storybook
adicionado controlladores para os stories em react
1 parent 7bb082f commit c669edb

File tree

15 files changed

+514
-10
lines changed

15 files changed

+514
-10
lines changed

applications/react/src/components/Avatar/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ export function Avatar(props: AvatarProps) {
1313
</AvatarContainer>
1414
);
1515
}
16+
17+
Avatar.displayName = "Avatar";

applications/react/src/components/Box.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ export const Box = styled("div", {
66
backgroundColor: "$gray800",
77
border: "1px solid $gray600",
88
});
9+
10+
Box.displayName = "Box";

applications/react/src/components/Checkbox/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ export function Checkbox(props: CheckboxProps) {
1111
</CheckboxContainer>
1212
);
1313
}
14+
15+
Checkbox.displayName = "Checkbox";

applications/react/src/components/Heading.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ export const Heading = styled("h2", {
2323
size: "md",
2424
},
2525
});
26+
27+
Heading.displayName = "Heading";

applications/react/src/components/MultiStep/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ export function MultiStep({ size, currentStep = 1 }: MultiStepProps) {
1616
</MultiStepContainer>
1717
);
1818
}
19+
20+
MultiStep.displayName = "MultiStep";

applications/react/src/components/Text.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,5 @@ export const Text = styled("p", {
2727
size: "md",
2828
},
2929
});
30+
31+
Text.displayName = "Text";

applications/react/src/components/TextArea.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,5 @@ export const TextArea = styled("textarea", {
2828
color: "$gray400",
2929
},
3030
});
31+
32+
TextArea.displayName = "TextArea";

applications/react/src/components/TextInput/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ export function TextInput({ prefix, ...props }: TextInputProps) {
99
</TextInputContainer>
1010
);
1111
}
12+
13+
TextInput.displayName = "TextInput";

documentations/react/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
},
1212
"dependencies": {
1313
"@storybook/addons": "^7.6.17",
14+
"@storybook/addon-a11y": "^6.5.12",
1415
"polished": "^4.3.1",
1516
"react": "^18.2.0",
1617
"react-dom": "^18.2.0"

documentations/react/src/stories/Avatar.stories.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ export default {
88
src: "https://github.com/kevinDsousa.png",
99
alt: "Kevin Sousa",
1010
},
11+
argTypes: {
12+
src: {
13+
control: {
14+
type: "text",
15+
},
16+
},
17+
},
1118
} as Meta<AvatarProps>;
1219

1320
export const Primary: StoryObj<AvatarProps> = {};

0 commit comments

Comments
 (0)