CustomParamButton.tsx 605 B

1234567891011121314151617181920212223242526272829
  1. import React from 'react';
  2. interface Props {
  3. onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
  4. className: string;
  5. type: 'fa-plus' | 'fa-minus' | 'fa-chevron-right';
  6. btnText?: string;
  7. disabled?: boolean;
  8. }
  9. const CustomParamButton: React.FC<Props> = ({
  10. onClick,
  11. className,
  12. type,
  13. btnText,
  14. }) => (
  15. <button
  16. type="button"
  17. className={`button ${className} is-outlined`}
  18. onClick={onClick}
  19. >
  20. {btnText && <span>{btnText}</span>}
  21. <span className="icon">
  22. <i className={`fas fa-lg ${type}`} />
  23. </span>
  24. </button>
  25. );
  26. export default CustomParamButton;