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.
 
 
 

67 rivejä
1.7 KiB

  1. // material-ui
  2. import { useTheme } from '@mui/material/styles';
  3. import { useMediaQuery, Button, Stack } from '@mui/material';
  4. // assets
  5. import Google from 'assets/images/icons/google.svg';
  6. import Twitter from 'assets/images/icons/twitter.svg';
  7. import Facebook from 'assets/images/icons/facebook.svg';
  8. // ==============================|| FIREBASE - SOCIAL BUTTON ||============================== //
  9. const FirebaseSocial = () => {
  10. const theme = useTheme();
  11. const matchDownSM = useMediaQuery(theme.breakpoints.down('sm'));
  12. const googleHandler = async () => {
  13. // login || singup
  14. };
  15. const twitterHandler = async () => {
  16. // login || singup
  17. };
  18. const facebookHandler = async () => {
  19. // login || singup
  20. };
  21. return (
  22. <Stack
  23. direction="row"
  24. spacing={matchDownSM ? 1 : 2}
  25. justifyContent={matchDownSM ? 'space-around' : 'space-between'}
  26. sx={{ '& .MuiButton-startIcon': { mr: matchDownSM ? 0 : 1, ml: matchDownSM ? 0 : -0.5 } }}
  27. >
  28. <Button
  29. variant="outlined"
  30. color="secondary"
  31. fullWidth={!matchDownSM}
  32. startIcon={<img src={Google} alt="Google" />}
  33. onClick={googleHandler}
  34. >
  35. {!matchDownSM && 'Google'}
  36. </Button>
  37. <Button
  38. variant="outlined"
  39. color="secondary"
  40. fullWidth={!matchDownSM}
  41. startIcon={<img src={Twitter} alt="Twitter" />}
  42. onClick={twitterHandler}
  43. >
  44. {!matchDownSM && 'Twitter'}
  45. </Button>
  46. <Button
  47. variant="outlined"
  48. color="secondary"
  49. fullWidth={!matchDownSM}
  50. startIcon={<img src={Facebook} alt="Facebook" />}
  51. onClick={facebookHandler}
  52. >
  53. {!matchDownSM && 'Facebook'}
  54. </Button>
  55. </Stack>
  56. );
  57. };
  58. export default FirebaseSocial;