This is just a technology testing project based on Create React App and TailwindCSS
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

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