Skip to content

Commit 4e08b08

Browse files
committed
Add API reference.
1 parent 897730a commit 4e08b08

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

README.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,7 @@
33
A React component for the font-awesome icon library.
44

55
- 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).
197
- Add your own `className`s, styles and other props (all additional props are passed directly to the component).
208
- Standard, non-ES6 JavaScript, so should work most places without a build step.
219
- Packaged as a CommonJS/npm module.
@@ -46,6 +34,21 @@ var MyComponent = React.createClass({
4634

4735
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.
4836

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+
4952

5053
## Contributing
5154

0 commit comments

Comments
 (0)