-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to have a click event for the primary button #150
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -13,6 +13,7 @@ export interface CardPrimaryProps { | |||
infoUrl?: string; | |||
infoText?: string; | |||
size?: "sm" | "md"; | |||
onButtonClick?: MouseEventHandler<HTMLElement>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think onButtonClick
is a bit confusing and might make the user think it applies with a button inside the card? it's already possible to add a onClick
event to the card, shouldn't we use the default porp?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The onClick might be needed for the wrapper div thats why I added the onButtonClick
I discussed this yesterday with @gjones and we thought that there would be a case where we need the button to have a different function than the card
18e23bd
to
b45a9cf
Compare
There is no option to have onClick for the button
So adding a prop to allow onButtonClick and also pass props to the wrapper