-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
1a83577
commit be29a1b
Showing
5 changed files
with
205 additions
and
182 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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import classNames from 'classnames'; | ||
import { loadCSS } from 'fg-loadcss/src/loadCSS'; | ||
import { withStyles } from '@material-ui/core/styles'; | ||
import red from '@material-ui/core/colors/red'; | ||
import Icon from '@material-ui/core/Icon'; | ||
|
||
const styles = theme => ({ | ||
root: { | ||
display: 'flex', | ||
justifyContent: 'center', | ||
alignItems: 'flex-end', | ||
}, | ||
icon: { | ||
margin: theme.spacing.unit * 2, | ||
}, | ||
iconHover: { | ||
margin: theme.spacing.unit * 2, | ||
'&:hover': { | ||
color: red[800], | ||
}, | ||
}, | ||
}); | ||
|
||
class FontAwesome extends React.Component { | ||
componentDidMount() { | ||
loadCSS( | ||
'https://use.fontawesome.com/releases/v5.1.0/css/all.css', | ||
document.querySelector('#insertion-point-jss'), | ||
); | ||
} | ||
|
||
render() { | ||
const { classes } = this.props; | ||
|
||
return ( | ||
<div className={classes.root}> | ||
<Icon className={classNames(classes.icon, 'fa fa-plus-circle')} /> | ||
<Icon className={classNames(classes.icon, 'fa fa-plus-circle')} color="primary" /> | ||
<Icon className={classNames(classes.icon, 'fa fa-plus-circle')} color="secondary" /> | ||
<Icon className={classNames(classes.icon, 'fa fa-plus-circle')} color="action" /> | ||
<Icon | ||
className={classNames(classes.iconHover, 'fa fa-plus-circle')} | ||
color="error" | ||
style={{ fontSize: 30 }} | ||
/> | ||
<Icon | ||
className={classNames(classes.icon, 'fa fa-plus-circle')} | ||
color="disabled" | ||
style={{ fontSize: 36 }} | ||
/> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
FontAwesome.propTypes = { | ||
classes: PropTypes.object.isRequired, | ||
}; | ||
|
||
export default withStyles(styles)(FontAwesome); |
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
Oops, something went wrong.