2015-10-11 20:07:09 +03:00
|
|
|
import React from 'react';
|
2015-09-19 18:53:31 +03:00
|
|
|
import style from './style';
|
|
|
|
|
2015-10-21 13:25:07 +03:00
|
|
|
const FontIcon = props => {
|
2015-10-20 08:40:51 +03:00
|
|
|
let className = style[props.value];
|
|
|
|
if (props.className) className += ` ${props.className}`;
|
|
|
|
return (
|
|
|
|
<span data-react-toolbox='icon' {...props} className={className}>
|
|
|
|
{props.children}
|
|
|
|
</span>
|
|
|
|
);
|
|
|
|
};
|
2015-09-19 18:53:31 +03:00
|
|
|
|
2015-10-20 08:40:51 +03:00
|
|
|
FontIcon.propTypes = {
|
|
|
|
className: React.PropTypes.string,
|
|
|
|
value: React.PropTypes.string
|
|
|
|
};
|
2015-09-19 18:53:31 +03:00
|
|
|
|
2015-10-20 08:40:51 +03:00
|
|
|
FontIcon.defaultProps = {
|
|
|
|
className: ''
|
|
|
|
};
|
2015-09-19 18:53:31 +03:00
|
|
|
|
2015-10-20 08:40:51 +03:00
|
|
|
export default FontIcon;
|