Skip to content

Commit

Permalink
[docs] Format number icons search (#32239)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari authored Apr 11, 2022
1 parent a8db12e commit 209c3b4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/data/material/components/material-icons/SearchIcons.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,10 @@ const Paper = styled(MuiPaper)(({ theme }) => ({
width: '100%',
}));

function formatNumber(value) {
return new Intl.NumberFormat('en-US').format(value);
}

const Input = styled(InputBase)({
marginLeft: 8,
flex: 1,
Expand Down Expand Up @@ -558,7 +562,9 @@ export default function SearchIcons() {
inputProps={{ 'aria-label': 'search icons' }}
/>
</Paper>
<Typography sx={{ mb: 1 }}>{`${icons.length} matching results`}</Typography>
<Typography sx={{ mb: 1 }}>{`${formatNumber(
icons.length,
)} matching results`}</Typography>
<Icons icons={icons} handleOpenClick={handleOpenClick} />
</Grid>
<DialogDetails
Expand Down

0 comments on commit 209c3b4

Please sign in to comment.