Mastermindzh / react-cookie-consent

A small, simple and customizable cookie consent bar for use in React applications.
https://mastermindzh.github.io/react-cookie-consent/
MIT License
603 stars 84 forks source link

decline Button Component #174

Closed rtgfxp closed 1 year ago

rtgfxp commented 1 year ago

Thank you for your wonderful code, I did not understand how to make the decline button also MUI type, is it possible to add DeclineButtonComponent? Thank you very much

Mastermindzh commented 1 year ago

Hey,

No problem!

Defining the "ButtonComponent" will apply it to both buttons. You can see an example story here:

https://github.com/Mastermindzh/react-cookie-consent/blob/master/stories/stories/muiButtons.story.ts

Which renders both a primary accept, and a secondary decline in MUI style: image

rtgfxp commented 1 year ago

thank you for replay is it possible to make customButtonProps for the decline button?

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.