style-guide icon indicating copy to clipboard operation
style-guide copied to clipboard

Expose role in Button component

Open coderitual opened this issue 2 years ago • 2 comments

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.

image

Reference:

  • https://github.com/brainly/brainly-frontend/pull/21231

coderitual avatar Jun 10 '22 12:06 coderitual

You can use role prop, because we are passing rest props of type React.AllHTMLAttributes<HTMLElement> to button element.

clxandstuff avatar Mar 22 '23 10:03 clxandstuff

Yea true, I guess I meant expose it explicitly with documentation and examples. Sorry for the confusion.

coderitual avatar Mar 29 '23 13:03 coderitual