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.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. import NavigateNextIcon from '@mui/icons-material/NavigateNext';
  2. import { Breadcrumbs, Divider, Grid, Typography } from '@mui/material';
  3. import PropType from 'prop-types';
  4. const StepTitle = ({ title, breadcrumbsArray }) => {
  5. return (
  6. <>
  7. <Grid item xs={12}>
  8. <Typography
  9. variant="h3"
  10. sx={{
  11. ml: { xs: 2, md: 12 },
  12. mt: 12,
  13. height: '100%',
  14. color: 'primary.main',
  15. }}
  16. >
  17. {title}
  18. </Typography>
  19. </Grid>
  20. <Grid item xs={12}>
  21. <Divider
  22. sx={{
  23. backgroundColor: 'primary.main',
  24. ml: { xs: 2, md: 12 },
  25. mr: { xs: 2, md: 12 },
  26. }}
  27. />
  28. </Grid>
  29. <Grid item xs={12} sx={{ mt: 4 }}>
  30. <Breadcrumbs
  31. aria-label="breadcrumb"
  32. separator={<NavigateNextIcon fontSize="small" />}
  33. sx={{ ml: { xs: 2, md: 12 }, fontSize: 20 }}
  34. >
  35. {breadcrumbsArray.map((entry, index) => {
  36. return (
  37. <Typography
  38. sx={{ fontSize: { xs: '16px', md: '22px' } }}
  39. key={index}
  40. color={index === breadcrumbsArray.length - 1 ? 'red' : 'black'}
  41. >
  42. {entry}
  43. </Typography>
  44. );
  45. })}
  46. </Breadcrumbs>
  47. </Grid>
  48. </>
  49. );
  50. };
  51. StepTitle.propTypes = {
  52. title: PropType.string,
  53. breadcrumbsArray: PropType.arrayOf(PropType.string),
  54. };
  55. export default StepTitle;