Skip to content

Commit

Permalink
Merge pull request #10 from entria/refactor/Usage
Browse files Browse the repository at this point in the history
improve usage to avoid mistakes
  • Loading branch information
sibelius authored Apr 24, 2017
2 parents 7dae5f9 + 4655bd3 commit d40dfb2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Icon extends Component {
style={[styles.icon, { color }, style]}
ref={component => this._root = component}
>
{Icons[children]}
{children}
</Text>
);
}
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ Follow this guides for adding FontAwesome.ttf to your projects:

# Usage
```javascript
import FontAwesome from 'react-native-fontawesome';
import FontAwesome, { Icons } from 'react-native-fontawesome';

...
render() {
return (
<View>
<TouchableHighlight>
<Text style={{margin: 10, fontSize: 15, textAlign: 'left'}}>
<FontAwesome> key</FontAwesome>
<FontAwesome>{Icons.chevronLeft}</FontAwesome>
Text
</Text>
</TouchableHighlight>
Expand All @@ -58,6 +58,6 @@ Example: `th-large` becomes `thLarge`
# Why this is fast, and uses almost no extra memory
This package uses the Text element to render Icons. The Text element delegates
to the OS the render process of the icons based on the Font file.
Both IOS and Android render fonts amazingly fast with little memory overhead. In essence
Both IOS and Android render fonts amazingly fast with little memory overhead. In essence
FontAwesome.ttf will be used by the OS to render icons and will benefit of years
of native software improvement as well hardware acceleration.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-native-fontawesome",
"description": "Font Awesome Icons for React Native",
"version": "4.7.0",
"version": "5.7.0",
"author": "Rafael Turk",
"bugs": {
"url": "https://github.com/rturk/react-native-fontawesome/issues"
Expand Down

0 comments on commit d40dfb2

Please sign in to comment.