Created
April 12, 2022 07:53
-
-
Save pushkar100/0372fac17119f62a7520d74fa8c9ceb1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const Button = ({ text, onClick, tabIndex, ariaDisabled }) => { | |
| return ( | |
| <button | |
| onClick={onClick} | |
| tabIndex={tabIndex} | |
| role="button" | |
| aria-disabled={ariaDisabled} | |
| > | |
| {text} | |
| </button> | |
| ); | |
| }; | |
| export default Button; | |
| // usage | |
| {/* <Button | |
| text="send" | |
| onClick={() => console.log("Clicked")} | |
| role="button" | |
| tabIndex={0} | |
| ariaDisabled="false" | |
| /> | |
| <Button | |
| text="open" | |
| onClick={() => console.log("Clicked")} | |
| role="button" | |
| tabIndex={1} | |
| ariaDisabled="false" | |
| /> */} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment