Moved updated fonticon to new file
parent
4cb7fe1f55
commit
6206e70183
|
@ -1,18 +1,24 @@
|
|||
import React from 'react';
|
||||
import style from './style';
|
||||
import ClassNames from 'classnames';
|
||||
|
||||
const FontIcon = ({
|
||||
children,
|
||||
className,
|
||||
value,
|
||||
...otherProps
|
||||
}) => {
|
||||
|
||||
const classes = ClassNames('material-icons', className);
|
||||
|
||||
const FontIcon = props => {
|
||||
let className = style[props.value];
|
||||
if (props.className) className += ` ${props.className}`;
|
||||
return (
|
||||
<i data-react-toolbox='icon' {...props} className={className}>
|
||||
{props.children}
|
||||
</i>
|
||||
<span className={classes} {...otherProps} >
|
||||
{value ? value : children}
|
||||
</span>
|
||||
);
|
||||
};
|
||||
|
||||
FontIcon.propTypes = {
|
||||
children: React.PropTypes.any,
|
||||
children: React.PropTypes.string,
|
||||
className: React.PropTypes.string,
|
||||
value: React.PropTypes.string
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue