2016-05-29 13:47:27 +03:00
|
|
|
import React, { PropTypes } from 'react';
|
2016-05-16 15:18:53 +03:00
|
|
|
import classnames from 'classnames';
|
2015-11-23 01:41:00 +03:00
|
|
|
|
2016-05-16 15:18:53 +03:00
|
|
|
const FontIcon = ({ children, className, value, ...other}) => (
|
|
|
|
<span
|
|
|
|
data-react-toolbox='font-icon'
|
|
|
|
className={classnames({'material-icons': typeof value === 'string'}, className)}
|
|
|
|
{...other}
|
|
|
|
>
|
|
|
|
{value}
|
|
|
|
{children}
|
|
|
|
</span>
|
|
|
|
);
|
2015-09-19 18:53:31 +03:00
|
|
|
|
2015-10-20 08:40:51 +03:00
|
|
|
FontIcon.propTypes = {
|
2016-05-29 13:47:27 +03:00
|
|
|
children: PropTypes.any,
|
|
|
|
className: PropTypes.string,
|
|
|
|
value: PropTypes.oneOfType([
|
|
|
|
PropTypes.string,
|
|
|
|
PropTypes.element
|
2016-01-22 19:18:59 +03:00
|
|
|
])
|
2015-10-20 08:40:51 +03:00
|
|
|
};
|
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;
|