Skip to content

Commit

Permalink
feat: allow <Button> to take a data-testid prop
Browse files Browse the repository at this point in the history
  • Loading branch information
ahuth committed Jul 26, 2021
1 parent e191aa9 commit 2256f72
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 1 addition & 3 deletions packages/components/src/Button/button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ export default {
},
};

type Args = React.ComponentProps<typeof Button> & {
"data-testid"?: string;
};
type Args = React.ComponentProps<typeof Button>;

const Template: Story<Args> = (args) => <Button {...args} />;

Expand Down
1 change: 1 addition & 0 deletions packages/components/src/Button/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export type ButtonProps = ButtonHTMLElementProps & {
*/
children: ReactNode;
color?: ClickableProps<"button">["color"];
"data-testid"?: string;
size?: ClickableProps<"button">["size"];
variant?: ClickableProps<"button">["variant"];
};
Expand Down

0 comments on commit 2256f72

Please sign in to comment.