@proximus/react-native-font-icons
v3.0.3
Published
Fonts + set of icon fonts to be used in React Native apps.
Downloads
253
Maintainers
Readme
@proximus/react-native-font-icons
Fonts + set of icon fonts to be used in React Native apps.
Build Status
Getting started
$ npm install @proximus/react-native-font-icons --save
$ react-native link @proximus/react-native-font-icons
Usage
import { IconMap, Icon, Fonts, NucleoIcon, Nucleo } from '@proximus/react-native-font-icons';
// Normal icon font use
<Icon name={IconMap.Smartphone} size={24} style="{{color:'red'}}" />
// Nucelo Fonts
<NucleoIcon name={Nucleo.AddBig} size={36} style="{{color:'blue'}}" />
// Text user
<Text style={{fontFamily: Fonts.primary}} />
Updating the icons fonts
UI Designers must provide fonts assets for Nucleo and/or pxIcon library.
- Replace with received assets the latests fonts in src/assets/font/** and demo/fonts/**
- Defined in glyphMap.json (located src/assets/**) the icons names with specific default code (Provided by Designers)
- NOTE : please follow this pattern : icon-my-pxs-app-iconfont_{iconName} so icon names are aligned
- Mapped those icons so it can be used as constants (located in src/styling) depending the icon type.
- Update the version of the library in package.json
- Publish the library
- Once integrated in MyPxs App, for android only you need to replace in android/app/src/main/assets/fonts, the latests fonts received from the designers
- Rebuild the app
- Voilà