[ABANDONED] React/Redux front end for the Flexor social network.
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.

28 lines
754 B

5 years ago
5 years ago
5 years ago
  1. import React, { FC, MouseEventHandler } from 'react'
  2. import noop from 'lodash/noop'
  3. import { IconDefinition } from '@fortawesome/fontawesome-common-types'
  4. import { useTheme } from '../../hooks'
  5. import Button from '../../components/controls/button'
  6. export interface Props {
  7. text: string
  8. icon?: IconDefinition
  9. loading?: boolean
  10. onClick?: MouseEventHandler
  11. }
  12. const PrimaryButton: FC<Props> = ({ text, icon, loading, onClick = noop }) => {
  13. const theme = useTheme()
  14. return (
  15. <Button
  16. text={text}
  17. icon={icon}
  18. loading={loading}
  19. color={theme.backgroundSecondary}
  20. backgroundColor={theme.secondary}
  21. onClick={onClick} />
  22. )
  23. }
  24. export default PrimaryButton