@material-ui/icons#ExpandMoreOutlined JavaScript Examples
The following examples show how to use
@material-ui/icons#ExpandMoreOutlined.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: accordions.js From horondi_client_fe with MIT License | 6 votes |
Accordions = ({ id, title, text, expanded, handleChange }) => {
const styles = useStyles();
return (
<Accordion
className={styles.accordion}
key={id}
expanded={expanded === id}
onChange={handleChange(id)}
>
<AccordionSummary
expandIcon={<ExpandMoreOutlined />}
aria-controls='panel1bh-content'
id='panel1bh-header'
>
<Typography component='span' className={styles.heading}>
{title}
</Typography>
</AccordionSummary>
<AccordionDetails>
<Typography component='span' className={styles.details}>
{text}
</Typography>
</AccordionDetails>
</Accordion>
);
}
Example #2
Source File: product-description.js From horondi_client_fe with MIT License | 4 votes |
ProductDescription = ({ product, currentSizeIndex }) => {
const styles = useStyles();
const { mainMaterial, innerMaterial, bottomMaterial, sizes, translationsKey } = product;
const currentWeight =
sizes && currentSizeIndex >= 0 ? sizes[currentSizeIndex].size.weightInKg : '';
const currentVolume =
sizes && currentSizeIndex >= 0 ? sizes[currentSizeIndex].size.volumeInLiters : '';
const { t } = useTranslation();
return (
<div className={styles.details}>
<div className={styles.description}>
<Accordion>
<AccordionSummary
expandIcon={<ExpandMoreOutlined />}
aria-controls='panel1a-content'
id='panel1a-header'
>
<Typography className={styles.title}>
{t('product.productDescription.description')}{' '}
</Typography>
</AccordionSummary>
<AccordionDetails>
<Typography component='div' className={styles.text}>
{parse(
String(t(`${translationsKey}.description`))
.replace(/ /g, '')
.replace(/;/g, '. ')
)}
</Typography>
</AccordionDetails>
</Accordion>
</div>
<div className={styles.description}>
<Accordion>
<AccordionSummary
expandIcon={<ExpandMoreOutlined />}
aria-controls='panel1a-content'
id='panel1a-header'
>
<Typography className={styles.title}>
{t('product.productDescription.material')}
</Typography>
</AccordionSummary>
<AccordionDetails>
<Typography component='div' className={styles.text}>
<Detail
subtitle={t('product.productDescription.mainMaterial')}
description={t(`${mainMaterial.material.translationsKey}.name`)}
/>
<Detail
subtitle={t('product.productDescription.innerMaterial')}
description={t(`${innerMaterial.material.translationsKey}.name`)}
/>
<Detail
subtitle={t('product.productDescription.bottomMaterial')}
description={t(`${bottomMaterial.material.translationsKey}.name`)}
/>
</Typography>
</AccordionDetails>
</Accordion>
</div>
<div className={styles.description}>
{currentVolume && currentWeight && product.available ? (
<Accordion>
<AccordionSummary
expandIcon={<ExpandMoreOutlined />}
aria-controls='panel1a-content'
id='panel1a-header'
>
<Typography className={styles.title}>
{t('product.productDescription.measurement')}{' '}
</Typography>
</AccordionSummary>
<AccordionDetails>
<Typography component='div' className={styles.text}>
<Detail
subtitle={t('product.weight.volumeLabel')}
description={`${currentVolume}`}
/>
<Detail
subtitle={t('product.weight.weightLabel')}
description={`${currentWeight}`}
/>
</Typography>
</AccordionDetails>
</Accordion>
) : null}
</div>
</div>
);
}