2.1.2 • Published 8 years ago
react-icon-base v2.1.2
react-icon-base
base element for react-icons
Installation
npm install react-icon-base --save
Usage
import { default as React } from 'react'
import { default as IconBase } from 'react-icon-base'
export default class FaHeart extends React.Component {
render() {
return (
<IconBase viewBox="0 0 1792 1896.0833" {...this.props}>
<g><path d="m896 1664q-26 0-44-18l-624-602q-10-8-27.5-26t-55.5-65.5-68-97.5-53.5-121-23.5-138q0-220 127-344t351-124q62 0 126.5 21.5t120 58 95.5 68.5 76 68q36-36 76-68t95.5-68.5 120-58 126.5-21.5q224 0 351 124t127 344q0 221-229 450l-623 600q-18 18-44 18z"/></g>
</IconBase>
)
}
}
Configuration
You can configure react-icon-base props in context.
class HigherOrderComponent extends Component {
static childContextTypes = {
reactIconBase: PropTypes.object
};
getChildContext() {
return {
reactIconBase: {
color: 'tomato',
size: 24,
style: {
...
}
}
}
}
render() {
...
}
}
Context can be overriden inline, like so:
<Icon size={30} color='aliceblue' style={{ ... }} />
Licence
MIT
2.1.2
8 years ago
2.1.1
8 years ago
2.1.0
8 years ago
2.0.8
8 years ago
2.0.7
8 years ago
2.0.6
8 years ago
2.0.5
8 years ago
2.0.4
9 years ago
2.0.3
9 years ago
2.0.2
9 years ago
2.0.0
9 years ago
1.0.0
10 years ago
0.1.0
10 years ago
0.0.7
10 years ago
0.0.6
10 years ago
0.0.5
10 years ago
0.0.4
10 years ago
0.0.3
10 years ago
0.0.2
10 years ago
0.0.1
10 years ago