This is just a technology testing project based on Create React App and TailwindCSS
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

19 Zeilen
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