Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

ButtonGroup.tsx 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. import { Box, Button } from '@mui/material';
  2. import { useTranslation } from 'next-i18next';
  3. import { FC } from 'react';
  4. interface Props {
  5. handleBackToCart: () => void;
  6. handleStripePayment: () => void;
  7. }
  8. const ButtonGroup: FC<Props> = ({ handleBackToCart, handleStripePayment }) => {
  9. const { t } = useTranslation('shipping');
  10. return (
  11. <Box
  12. sx={{
  13. display: 'flex',
  14. mb: 2,
  15. borderRadius: 2,
  16. }}
  17. >
  18. <Button
  19. variant="contained"
  20. sx={{
  21. mt: 3,
  22. mb: 2,
  23. height: 50,
  24. width: 150,
  25. textTransform: 'none',
  26. backgroundColor: 'primary.main',
  27. color: 'white',
  28. mr: 2,
  29. }}
  30. onClick={handleBackToCart}
  31. >
  32. {t('shipping:back')}
  33. </Button>
  34. <Button
  35. type="submit"
  36. variant="contained"
  37. sx={{
  38. mt: 3,
  39. mb: 2,
  40. backgroundColor: '#CBA213',
  41. height: 50,
  42. width: 200,
  43. textTransform: 'none',
  44. color: 'white',
  45. }}
  46. onClick={handleStripePayment}
  47. >
  48. {t('shipping:continue')}
  49. </Button>
  50. </Box>
  51. );
  52. };
  53. export default ButtonGroup;