Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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: [
}).then(() => {
registerCustomIconType(
'fontello',
createIconSetFromFontello(fontelloConfig)
);
this.setState({ fontLoaded: true });
});
}
'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:
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 (
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: {},
};