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.

StepTitle.jsx 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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={{ pl: 12, mt: 12, height: '100%', color: 'primary.main' }}
  11. >
  12. {title}
  13. </Typography>
  14. </Grid>
  15. <Grid item xs={12}>
  16. <Divider sx={{ backgroundColor: 'primary.main', mx: 12 }} />
  17. </Grid>
  18. <Grid item xs={12} sx={{ mt: 4 }}>
  19. <Breadcrumbs
  20. aria-label="breadcrumb"
  21. separator={<NavigateNextIcon fontSize="small" />}
  22. sx={{ pl: 12, fontSize: 20 }}
  23. >
  24. {breadcrumbsArray.map((entry, index) => {
  25. return (
  26. <Typography
  27. fontSize="20px"
  28. key={index}
  29. color={index === breadcrumbsArray.length - 1 ? 'red' : 'black'}
  30. >
  31. {entry}
  32. </Typography>
  33. );
  34. })}
  35. <Typography></Typography>
  36. </Breadcrumbs>
  37. </Grid>
  38. </>
  39. );
  40. };
  41. StepTitle.propTypes = {
  42. title: PropType.string,
  43. breadcrumbsArray: PropType.arrayOf(PropType.string),
  44. };
  45. export default StepTitle;