react-fontawesome
Advanced tools
Comparing version 0.2.1 to 0.2.3
12
index.js
@@ -7,12 +7,12 @@ var _ = require('lodash') | ||
propTypes: { | ||
name: React.PropTypes.string.isRequired, | ||
size: React.PropTypes.oneOf(['1x', '2x', '3x', '4x', '5x']), | ||
spin: React.PropTypes.bool, | ||
pulse: React.PropTypes.bool, | ||
border: React.PropTypes.bool, | ||
fixedWidth: React.PropTypes.bool, | ||
flip: React.PropTypes.oneOf(['horizontal', 'vertical']), | ||
inverse: React.PropTypes.bool, | ||
flip: React.PropTypes.oneOf(['horizontal', 'vertical']), | ||
name: React.PropTypes.string.isRequired, | ||
pulse: React.PropTypes.bool, | ||
rotate: React.PropTypes.oneOf(['90', '180', '270']), | ||
stack: React.PropTypes.oneOf(['1x', '2x']) | ||
size: React.PropTypes.oneOf(['lg', '2x', '3x', '4x', '5x']), | ||
spin: React.PropTypes.bool, | ||
stack: React.PropTypes.oneOf(['1x', '2x']), | ||
}, | ||
@@ -19,0 +19,0 @@ |
{ | ||
"name": "react-fontawesome", | ||
"version": "0.2.1", | ||
"version": "0.2.3", | ||
"description": "A React FontAwesome component.", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -5,6 +5,14 @@ # react-fontawesome | ||
- Simple API that mirrors Font Awesome's classes. | ||
- Supports all Font Awesome modifiers (see [API](#API) below). | ||
- Add your own `className`s, styles and other props (all additional props are passed directly to the component). | ||
- Standard, non-ES6 JavaScript, so should work most places without a build step. | ||
- Packaged as a CommonJS/npm module. | ||
- Doesn't use JSX so no transforms needed. | ||
- Does not require a specific build process/tool other than something that supports npm. | ||
## Usage | ||
``` | ||
```js | ||
var React = require('react'); | ||
@@ -17,6 +25,6 @@ var FontAwesome = require('react-fontawesome'); | ||
<FontAwesome | ||
name="rocket" | ||
className='super-crazy-colors' | ||
name='rocket' | ||
size='2x' | ||
spin | ||
size="lg" | ||
className="super-crazy-colors" | ||
style={{ textShadow: '0 1px 0 rgba(0, 0, 0, 0.1)' }} | ||
@@ -29,3 +37,20 @@ /> | ||
This component does not include any of the Font Awesome CSS or fonts, so you'll need to make sure to include those on your end somehow, either by adding them to your build process or linking to the CDN versions. | ||
### API | ||
| Prop Name | Type | Default | Description | | ||
|---------------|-------------|---------|-------------| | ||
| `border` | `boolean` | `false` | | | ||
| `fixedWidth` | `boolean` | `false` | | | ||
| `flip` | `string` | `''` | Choices: `'horizontal'` or `'vertical'` | | ||
| `inverse` | `boolean` | `false` | | | ||
| `name` | `string` | `''` | **Required:** `'check'`, `'cloud'`, `'person'`, etc... (e.g. any Font Awesome icon class name, minus the `fa-` prefix) | | ||
| `pulse` | `boolean` | `false` | | | ||
| `rotate` | `string` | `''` | Choices: `'90'`, `'180'` or `'270'` | | ||
| `size` | `string` | `''` | Choices: `'lg'`, `'2x'`, `'3x'`, `'4x'` or `'5x'` | | ||
| `spin` | `boolean` | `false` | | | ||
| `stack` | `string` | `''` | Choices: `'1x'` or `'2x'` | | ||
## Contributing | ||
@@ -32,0 +57,0 @@ |
@@ -38,2 +38,3 @@ var React = require('react/addons'); | ||
'fa', | ||
'fa-lg', | ||
'fa-rocket', | ||
@@ -40,0 +41,0 @@ 'fa-spin', |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
599684
16722
70