add fill support

This commit is contained in:
Ian J Miller 2020-01-14 19:06:02 -05:00
parent f8a6bd923d
commit ddf8844abb

View File

@ -4,14 +4,14 @@ import IconInner from './IconInner';
class FeatherIcon extends Component { class FeatherIcon extends Component {
render() { render() {
const { icon, size, className, ...otherProps } = this.props; const { icon, size, className, fill, ...otherProps } = this.props;
return ( return (
<svg <svg
width={size} width={size}
height={size} height={size}
viewBox="0 0 24 24" viewBox="0 0 24 24"
fill="none" fill={fill || 'none'}
stroke="currentColor" stroke="currentColor"
strokeWidth="2" strokeWidth="2"
strokeLinecap="round" strokeLinecap="round"
@ -28,7 +28,8 @@ class FeatherIcon extends Component {
FeatherIcon.propTypes = { FeatherIcon.propTypes = {
icon: PropTypes.string.isRequired, icon: PropTypes.string.isRequired,
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
className: PropTypes.string className: PropTypes.string,
fill: PropTypes.string
}; };
FeatherIcon.defaultProps = { FeatherIcon.defaultProps = {