How to use the react-native-vector-icons.createIconSetFromIcoMoon function in react-native-vector-icons

To help you get started, we’ve selected a few react-native-vector-icons examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zzorba / ArkhamCards / assets / AppIcon.ts View on Github external
import { createIconSetFromIcoMoon } from 'react-native-vector-icons';

// @ts-ignore
import appIconConfig from './app.json';

export default createIconSetFromIcoMoon(appIconConfig);
github djchie / react-native-star-rating / StarButton.js View on Github external
iconSetFromProps() {
    const {
      icoMoonJson,
      iconSet,
    } = this.props;
    if (icoMoonJson) {
      return createIconSetFromIcoMoon(icoMoonJson);
    }

    return iconSets[iconSet];
  }
github zzorba / ArkhamCards / assets / ForgottenIcon.ts View on Github external
import { createIconSetFromIcoMoon } from 'react-native-vector-icons';

import forgottenIconConfig from './forgotten.json';

export default createIconSetFromIcoMoon(forgottenIconConfig);
github zzorba / ArkhamCards / assets / CircleIcon.ts View on Github external
import { createIconSetFromIcoMoon } from 'react-native-vector-icons';

import circleIconConfig from './circle.json';

export default createIconSetFromIcoMoon(circleIconConfig);
github zzorba / ArkhamCards / assets / CarcosaIcon.ts View on Github external
import { createIconSetFromIcoMoon } from 'react-native-vector-icons';

import carcosaIconConfig from './carcosa.json';

export default createIconSetFromIcoMoon(carcosaIconConfig);
github phodal / growth / src / icon / GrowthFont.js View on Github external
import { createIconSetFromIcoMoon } from 'react-native-vector-icons';
import icoMoonConfig from '../../assets/glyphmaps/growth.json';

const Icon = createIconSetFromIcoMoon(icoMoonConfig, 'growth');

export default Icon;

export const Button = Icon.Button;
export const TabBarItem = Icon.TabBarItem;
export const TabBarItemIOS = Icon.TabBarItemIOS;
export const ToolbarAndroid = Icon.ToolbarAndroid;
export const getImageSource = Icon.getImageSource;
github galio-org / galio / src / Icon.js View on Github external
import React from 'react';
import { Font } from 'expo';
import Icons, { createIconSetFromIcoMoon } from 'react-native-vector-icons';
import PropTypes from 'prop-types';

import theme from './theme';
import galioConfig from './fonts/galio';

Icons.Galio = createIconSetFromIcoMoon(galioConfig, 'Galio');
const GalioFont = require('./fonts/galio.ttf');

class Icon extends React.Component {
  static defaultProps = {
    name: null,
    family: null,
    size: theme.SIZES.BASE,
    color: theme.COLORS.BLACK,
  };

  state = {
    fontLoaded: false,
  }

  async componentDidMount() {
    await Font.loadAsync({
github bluedaniel / Kakapo-native / src / components / soundItem.js View on Github external
import React, { TouchableOpacity, Text, View, Animated } from 'react-native';
import Rx from 'rxjs';
import Color from 'color';
import Slider from 'react-native-slider';
import { createIconSetFromIcoMoon } from 'react-native-vector-icons';
import { soundActions } from '../actions';
import styles from '../styles/soundItem';
import icoMoonConfig from 'kakapo-assets/icomoon/selection.json';

const Icon = createIconSetFromIcoMoon(icoMoonConfig);
const AnimatedIcon = Animated.createAnimatedComponent(Icon);

const subject = new Rx.Subject()
.debounceTime(33)
.distinctUntilChanged();

subject.subscribe({
  next: ({ dispatch, sound, vol }) => dispatch(soundActions.soundsVolume(sound, vol))
});

export default ({ themes, sound, dispatch }) => {
  const { img, playing, name, volume } = sound;

  const styleAnim = new Animated.Value(playing ? 150 : 0);

  const togglePlay = () => {
github zzorba / ArkhamCards / assets / CoreSetIcon.ts View on Github external
import { createIconSetFromIcoMoon } from 'react-native-vector-icons';

import coreSetIconConfig from './core.json';

export default createIconSetFromIcoMoon(coreSetIconConfig);