Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 

33 řádky
963 B

  1. import { Box, Typography } from '@mui/material';
  2. import { getOrgDisplayNames } from 'utils/OrgComboUtils';
  3. export default function OrgOptionLabel({ option }) {
  4. const { primary, secondary } = getOrgDisplayNames(option);
  5. if (!primary) return null;
  6. return (
  7. <Box sx={{ py: 0.25, width: '100%' }}>
  8. <Typography variant="body2" lineHeight={1.3}>
  9. {primary}
  10. </Typography>
  11. {secondary ? (
  12. <Typography
  13. variant="body2"
  14. color="text.secondary"
  15. lineHeight={1.25}
  16. sx={{ display: 'block', mt: 0.25, fontSize: '0.8125rem' }}
  17. >
  18. {secondary}
  19. </Typography>
  20. ) : null}
  21. </Box>
  22. );
  23. }
  24. export const renderOrgOption = (props, option) => (
  25. <li {...props} key={option.key ?? option.id}>
  26. <OrgOptionLabel option={option} />
  27. </li>
  28. );