|
3 | 3 | A React component for the font-awesome icon library.
|
4 | 4 |
|
5 | 5 | - Simple API that mirrors Font Awesome's classes.
|
6 |
| -- Supports all Font Awesome modifiers: |
7 |
| - |
8 |
| - - `border` - boolean |
9 |
| - - `fixedWidth` - boolean |
10 |
| - - `flip` - `'horizontal'` | `'vertical'` |
11 |
| - - `inverse` - boolean |
12 |
| - - `name` - `'check'`, `'cloud'`, `'person'`, etc... (e.g. any Font Awesome icon class name, minus the `fa-` prefix) |
13 |
| - - `pulse` - boolean |
14 |
| - - `rotate` - `'90'` | `'180'` | `'270'` |
15 |
| - - `size` - `'1x'` | `'2x'` | `'3x'` | `'4x'` | `'5x'` |
16 |
| - - `spin` - boolean |
17 |
| - - `stack` - `'1x'` | `'2x'` |
18 |
| - |
| 6 | +- Supports all Font Awesome modifiers (see [API](#API) below). |
19 | 7 | - Add your own `className`s, styles and other props (all additional props are passed directly to the component).
|
20 | 8 | - Standard, non-ES6 JavaScript, so should work most places without a build step.
|
21 | 9 | - Packaged as a CommonJS/npm module.
|
@@ -46,6 +34,21 @@ var MyComponent = React.createClass({
|
46 | 34 |
|
47 | 35 | 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.
|
48 | 36 |
|
| 37 | +### API |
| 38 | + |
| 39 | +| Prop Name | Type | Default | Description | |
| 40 | +|---------------|-------------|---------|-------------| |
| 41 | +| `border` | `boolean` | `false` | | |
| 42 | +| `fixedWidth` | `boolean` | `false` | | |
| 43 | +| `flip` | `string` | `''` | Choices: `'horizontal'` or `'vertical'` | |
| 44 | +| `inverse` | `boolean` | `false` | | |
| 45 | +| `name` | `string` | `''` | **Required:** `'check'`, `'cloud'`, `'person'`, etc... (e.g. any Font Awesome icon class name, minus the `fa-` prefix) | |
| 46 | +| `pulse` | `boolean` | `false` | | |
| 47 | +| `rotate` | `string` | `''` | Choices: `'90'`, `'180'` or `'270'` | |
| 48 | +| `size` | `string` | `''` | Choices: `'1x'`, `'2x'`, `'3x'`, `'4x'` or `'5x'` | |
| 49 | +| `spin` | `boolean` | `false` | | |
| 50 | +| `stack` | `string` | `''` | Choices: `'1x'` or `'2x'` | |
| 51 | + |
49 | 52 |
|
50 | 53 | ## Contributing
|
51 | 54 |
|
|
0 commit comments