How to use the react-native-vector-icons.createIconSetFromFontello 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 berty / berty / client / react-native / app / view / component / Icon.js View on Github external
import { View, Text } from 'react-native'
import { createIconSetFromFontello } from 'react-native-vector-icons'
import IconAwesome from 'react-native-vector-icons/dist/FontAwesome'
import IconFeather from 'react-native-vector-icons/dist/Feather'
import IconMatCom from 'react-native-vector-icons/dist/MaterialCommunityIcons'
import React from 'react'

import { colors } from '@berty/common/constants'
import fontelloConfig from '@berty/common/static/svg/config.json'
const IconBerty = createIconSetFromFontello(fontelloConfig)

const Icon = ({ name, color, rotate, src, style, flip, ...props }) => {
  if (name == null) return null
  const [type, iconName] = [
    name.split('-', 1)[0],
    name
      .split('-')
      .splice(1)
      .join('-'),
  ]
  const iconProps = {
    name: iconName,
    color: color || colors.textGrey,
    style: [
      {
        transform: [
github react-native-elements / react-native-elements / example / src / views / buttons_home.js View on Github external
}).then(() => {
      registerCustomIconType(
        'fontello',
        createIconSetFromFontello(fontelloConfig)
      );
      this.setState({ fontLoaded: true });
    });
  }
github phated / mxdbmobile / src / icon / Icon.js View on Github external
'use strict';

var ReasonReact = require("reason-react/src/ReasonReact.js");
var ConfigJson = require("./config.json");
var Js_null_undefined = require("bs-platform/lib/js/js_null_undefined.js");
var ReactNativeVectorIcons = require("react-native-vector-icons");
var MaterialIcons = require("react-native-vector-icons/dist/MaterialIcons");

var customIcon = ReactNativeVectorIcons.createIconSetFromFontello(ConfigJson);

function isCustom(name) {
  switch (name) {
    case "attack" : 
    case "cards" : 
    case "constant" : 
    case "deck" : 
    case "defend" : 
    case "info" : 
    case "intelligence" : 
    case "play" : 
    case "push" : 
    case "special" : 
    case "strength" : 
        return true;
    default:
github jsappme / react-native-firebase-starter / src / components / home_screen / navTab.js View on Github external
import React, { Component } from 'react'
import {
  View,
  TouchableOpacity,
  StyleSheet,
  Text
} from 'react-native'
import { getColor } from '../config'
import { observer, inject } from 'mobx-react/native'
import { createIconSetFromFontello } from 'react-native-vector-icons'


let fontelloConfig = require('../../assets/fontello/config.json')
let Icon = createIconSetFromFontello(fontelloConfig)


@inject("appStore") @observer
export default class NavigationTab extends Component {
  constructor(props) {
    super(props)
  }

  render() {
    return (
github hummingbird-me / kitsu-mobile / src / components / Icon.js View on Github external
import React from 'react';
import PropTypes from 'prop-types';
import { createIconSetFromFontello } from 'react-native-vector-icons';
import config from 'kitsu/assets/fonts/icons/config.json';

const Icon = createIconSetFromFontello(config);

const icon = ({ name, size, color, styles }) => (
  
);

icon.propTypes = {
  name: PropTypes.string.isRequired,
  size: PropTypes.number,
  color: PropTypes.string,
  styles: PropTypes.object,
};
icon.defaultProps = {
  size: 12,
  color: '#000000',
  styles: {},
};