Skip to content

Commit

Permalink
Adding material design icons
Browse files Browse the repository at this point in the history
  • Loading branch information
corymsmith committed Jul 29, 2015
1 parent fe5e25f commit 0e57a65
Show file tree
Hide file tree
Showing 10 changed files with 2,301 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Example/example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; };
2F4DA3581ACE2DDC00CC8346 /* libReactNativeIcons.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2F4DA3551ACE2DCD00CC8346 /* libReactNativeIcons.a */; };
2F615A2D1B698A5B004A7B1D /* Material-Design-Iconic-Font.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 2F615A2C1B698A5B004A7B1D /* Material-Design-Iconic-Font.ttf */; };
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
CE90A3461B50803400CB0E5D /* FontAwesome.otf in Resources */ = {isa = PBXBuildFile; fileRef = CE90A3421B50803400CB0E5D /* FontAwesome.otf */; };
CE90A3471B50803400CB0E5D /* foundation-icons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = CE90A3431B50803400CB0E5D /* foundation-icons.ttf */; };
Expand Down Expand Up @@ -112,6 +113,7 @@
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = iOS/main.m; sourceTree = "<group>"; };
146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "node_modules/react-native/React/React.xcodeproj"; sourceTree = "<group>"; };
2F4DA34F1ACE2DCD00CC8346 /* ReactNativeIcons.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ReactNativeIcons.xcodeproj; path = "node_modules/react-native-icons/ios/ReactNativeIcons.xcodeproj"; sourceTree = "<group>"; };
2F615A2C1B698A5B004A7B1D /* Material-Design-Iconic-Font.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Material-Design-Iconic-Font.ttf"; path = "../../FontAwesomeKit_forked/FontAwesomeKit/Material-Design-Iconic-Font.ttf"; sourceTree = "<group>"; };
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; };
CE90A3421B50803400CB0E5D /* FontAwesome.otf */ = {isa = PBXFileReference; lastKnownFileType = file; name = FontAwesome.otf; path = ../iOS/ReactNativeIcons/Libraries/FontAwesomeKit/FontAwesome.otf; sourceTree = "<group>"; };
CE90A3431B50803400CB0E5D /* foundation-icons.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "foundation-icons.ttf"; path = "../iOS/ReactNativeIcons/Libraries/FontAwesomeKit/foundation-icons.ttf"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -191,6 +193,7 @@
13B07FAE1A68108700A75B9A /* example */ = {
isa = PBXGroup;
children = (
2F615A2C1B698A5B004A7B1D /* Material-Design-Iconic-Font.ttf */,
CE90A3421B50803400CB0E5D /* FontAwesome.otf */,
CE90A3431B50803400CB0E5D /* foundation-icons.ttf */,
CE90A3441B50803400CB0E5D /* ionicons.ttf */,
Expand Down Expand Up @@ -429,6 +432,7 @@
CE90A3461B50803400CB0E5D /* FontAwesome.otf in Resources */,
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
CE90A3471B50803400CB0E5D /* foundation-icons.ttf in Resources */,
2F615A2D1B698A5B004A7B1D /* Material-Design-Iconic-Font.ttf in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
7 changes: 7 additions & 0 deletions Example/index.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,13 @@ var Example = React.createClass({
style={styles.lightbulb}/>
</View>

<Text style={styles.header}>
{'Material Icons'}
</Text>

<Icon name='material|face' size={90} style={{width:90, height: 90}} color='gray' />


<Text style={styles.header}>
{'Stacked Icons!'}
</Text>
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ A React Native wrapper on top of [https://github.com/PrideChung/FontAwesomeKit].

Currently FontAwesomeKit supports **4** different icon fonts.

- [FontAwesome 4.2](http://fortawesome.github.io/Font-Awesome/) Contains **479** icons
- [FontAwesome 4.4](http://fortawesome.github.io/Font-Awesome/) Contains **585** icons
- [ionicons 2.0.0](http://ionicons.com/) Contains **733** icons, lots of iOS 7 style outlined icons.
- [Foundation icons](http://zurb.com/playground/foundation-icon-fonts-3) Contains **283** icons.
- [Zocial](http://zocial.smcllns.com/) Contains **99** social icons.
- [Material design icons ](https://github.com/google/material-design-icons) Contains **744** social icons.

An icon has a name, size, and a color (optional)

Expand Down Expand Up @@ -59,6 +60,14 @@ var { Icon, } = require('react-native-icons');
color='#777777'
style={styles.lightbulb}
/>
<Icon
name='material|face'
size={30}
color='#333333'
style={styles.face}
/>
```

## Stacked icons
Expand Down
8 changes: 8 additions & 0 deletions iOS/ReactNativeIcons.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
2F343ACF1AE46C28002B3539 /* FAKIcon.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F343ABD1AE46C28002B3539 /* FAKIcon.m */; };
2F343AD01AE46C28002B3539 /* FAKIonIcons.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F343ABF1AE46C28002B3539 /* FAKIonIcons.m */; };
2F343AD11AE46C28002B3539 /* FAKZocial.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F343AC11AE46C28002B3539 /* FAKZocial.m */; };
2F615A3A1B698A87004A7B1D /* FAKMaterial.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F615A371B698A87004A7B1D /* FAKMaterial.m */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
Expand Down Expand Up @@ -61,6 +62,9 @@
2F343AC51AE46C28002B3539 /* ionicons.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = ionicons.ttf; sourceTree = "<group>"; };
2F343AC61AE46C28002B3539 /* zocial-regular-webfont.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "zocial-regular-webfont.ttf"; sourceTree = "<group>"; };
2F5A3EB81ACDBF8000439386 /* libReactNativeIcons.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libReactNativeIcons.a; sourceTree = BUILT_PRODUCTS_DIR; };
2F615A371B698A87004A7B1D /* FAKMaterial.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FAKMaterial.m; sourceTree = "<group>"; };
2F615A381B698A87004A7B1D /* FAKMaterial.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FAKMaterial.h; sourceTree = "<group>"; };
2F615A391B698A87004A7B1D /* Material-Design-Iconic-Font.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Material-Design-Iconic-Font.ttf"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -121,6 +125,9 @@
2F343AB71AE46C28002B3539 /* FontAwesomeKit */ = {
isa = PBXGroup;
children = (
2F615A371B698A87004A7B1D /* FAKMaterial.m */,
2F615A381B698A87004A7B1D /* FAKMaterial.h */,
2F615A391B698A87004A7B1D /* Material-Design-Iconic-Font.ttf */,
2F343AB81AE46C28002B3539 /* FAKFontAwesome.h */,
2F343AB91AE46C28002B3539 /* FAKFontAwesome.m */,
2F343ABA1AE46C28002B3539 /* FAKFoundationIcons.h */,
Expand Down Expand Up @@ -217,6 +224,7 @@
2F343AC71AE46C28002B3539 /* FAKIconImage.m in Sources */,
2F343ACB1AE46C28002B3539 /* SMXTabBarItemManager.m in Sources */,
2F343ACA1AE46C28002B3539 /* SMXTabBarItem.m in Sources */,
2F615A3A1B698A87004A7B1D /* FAKMaterial.m in Sources */,
2F343AD11AE46C28002B3539 /* FAKZocial.m in Sources */,
2F343ACE1AE46C28002B3539 /* FAKFoundationIcons.m in Sources */,
2F343AC81AE46C28002B3539 /* FAKIconImageManager.m in Sources */,
Expand Down
2 changes: 2 additions & 0 deletions iOS/ReactNativeIcons/FAKIconImage/FAKIconImageManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ - (UIView *)view
target = [FAKZocial class];
} else if([fontPrefix isEqualToString:@"foundation"]) {
target = [FAKFoundationIcons class];
} else if([fontPrefix isEqualToString:@"material"]) {
target = [FAKMaterial class];
}

SEL selector = NSSelectorFromString([NSString stringWithFormat:@"%@IconWithSize:",[self camelcase:iconIdentifier]]);
Expand Down
Loading

0 comments on commit 0e57a65

Please sign in to comment.