style-guide
style-guide copied to clipboard
Expose role in Button component
The idea is to expose role in button component to sometimes treat button only as a presentational element. I would say it's just a reason to start the discussion and maybe explore other solutions for this specific case.
Reference:
- https://github.com/brainly/brainly-frontend/pull/21231
You can use role
prop, because we are passing rest props of type React.AllHTMLAttributes<HTMLElement>
to button
element.
Yea true, I guess I meant expose it explicitly with documentation and examples. Sorry for the confusion.