-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c7cc6a8
commit 43889ad
Showing
3 changed files
with
58 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,21 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { withStyles } from '@material-ui/core/styles'; | ||
// import React from 'react'; | ||
|
||
const requireIcons = require.context('../../../../../packages/material-ui-icons/src', true, /js$/); | ||
// const requireIcons = require.context( | ||
// '../../../../../packages/material-ui-icons/src', true, /js$/); | ||
|
||
const styles = theme => ({ | ||
root: { | ||
color: theme.palette.text.primary, | ||
maxHeight: 300, | ||
overflow: 'auto', | ||
}, | ||
}); | ||
// function SvgMaterialIconsAll() { | ||
// return ( | ||
// <div> | ||
// {requireIcons.keys().map(key => { | ||
// if (key === './index.js' || key === './utils/createSvgIcon.js') { | ||
// return null; | ||
// } | ||
|
||
function SvgMaterialIconsAll(props) { | ||
const { classes } = props; | ||
return ( | ||
<div className={classes.root}> | ||
{requireIcons.keys().map(key => { | ||
if (key === './index.js' || key === './utils/createSvgIcon.js') { | ||
return null; | ||
} | ||
// const Icon = requireIcons(key).default; | ||
// return <Icon key={key} />; | ||
// })} | ||
// </div> | ||
// ); | ||
// } | ||
|
||
const Icon = requireIcons(key).default; | ||
return <Icon key={key} />; | ||
})} | ||
</div> | ||
); | ||
} | ||
|
||
SvgMaterialIconsAll.propTypes = { | ||
classes: PropTypes.object.isRequired, | ||
}; | ||
|
||
export default withStyles(styles)(SvgMaterialIconsAll); | ||
// export default withStyles(styles)(SvgMaterialIconsAll); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters