UNPKG

@expo/vector-icons

Version:

Built-in support for 10 popular icon fonts and the tooling to create your own Icon components from your font and glyph map. This is a wrapper around react-native-vector-icons to make it compatible with Expo.

13 lines (11 loc) 358 B
import React, { Component } from 'react'; import { IconFamilies } from './IconConstants'; export default class Icon extends Component { render() { return ( <span style={{ fontFamily: this.props.family }} className={this.props.className}> {String.fromCharCode(IconFamilies[this.props.family][this.props.name])} </span> ); } }