This is just a technology testing project based on Create React App and TailwindCSS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
614B

  1. import React from 'react'
  2. function PrimaryButton(props) {
  3. const {type, text, action, disabled} = props
  4. return <>
  5. <button
  6. type={type||'button'}
  7. className="btn-primary"
  8. onClick={action}
  9. disabled={disabled}
  10. aria-disabled={disabled}
  11. >
  12. <div className="sm:text-lg flex-grow text-center px-2">{text||'Primary Button'}</div>
  13. </button>
  14. {disabled && <div tabIndex="0" className="sr-only">Disabled button: {text||'Primary Button'}. Please fill all necessary fields.</div>}
  15. </>
  16. }
  17. export default PrimaryButton