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.

44 lines
1.2KB

  1. import React from 'react'
  2. function ButtonSecondary(props) {
  3. const {type, text, action, disabled} = props
  4. return <>
  5. <button
  6. type={type||'button'}
  7. className="
  8. appearance-none
  9. flex
  10. relative
  11. w-full
  12. py-3
  13. border-2
  14. rounded-md
  15. border-primary-800
  16. bg-white
  17. text-primary-800
  18. truncate
  19. cursor-pointer
  20. transform
  21. shadow-md
  22. hover:bg-primary-500
  23. hover:text-white
  24. focus:bg-primary-500
  25. focus:outline-none
  26. active:shadow-inner
  27. active:bg-primary-500
  28. active:scale-98
  29. disabled:bg-white
  30. disabled:opacity-50
  31. disabled:shadow-md
  32. disabled:scale-100
  33. disabled:cursor-not-allowed
  34. "
  35. onClick={action}
  36. disabled={disabled}
  37. >
  38. <div className="sm:text-lg flex-grow text-center px-2">{text||'primary Button'}</div>
  39. </button>
  40. </>
  41. }
  42. export default ButtonSecondary