Skip to content

Commit c74951d

Browse files
committed
removed onClick and children props from type
1 parent 05a689c commit c74951d

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

components/Buttons/Button/Button.tsx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,10 @@ type ButtonProps = {
4141
* Helps track in-page `event` interactions.
4242
*/
4343
analyticsObject?: GoogleAnalyticsEventPropType;
44-
/**
45-
* Element used as the button label.
46-
*/
47-
children: React.ReactNode | string;
4844
/**
4945
* Forces the component's width as wide as its parent container's width.
5046
*/
5147
fullWidth?: boolean;
52-
/**
53-
* Function to be called when button is clicked.
54-
*/
55-
onClick?: () => void | undefined;
5648
/**
5749
* Sets the button color theme.
5850
*/
@@ -90,9 +82,9 @@ export default function Button({
9082
})}
9183
data-testid={BUTTON}
9284
disabled={disabled}
93-
onClick={() => {
85+
onClick={e => {
9486
gtag.event(eventConfig);
95-
onClick();
87+
onClick(e);
9688
}}
9789
tabIndex={tabIndex}
9890
type={type}

0 commit comments

Comments
 (0)