How to use the @expo/vector-icons.createIconSetFromIcoMoon function in @expo/vector-icons

To help you get started, we’ve selected a few @expo/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 w771854332 / rn-twitter / src / components / home-widget.tsx View on Github external
Text as RNText,
  StyleSheet,
  TouchableHighlight,
  TouchableOpacity,
  TouchableWithoutFeedback,
  Platform,
  TouchableWithoutFeedbackProps,
  ViewProps,
  TouchableOpacityProps,
} from "react-native";
import Colors from "../constants/Colors";
const { Lottie } = require("expo").DangerZone;
const { createIconSetFromIcoMoon } = require("@expo/vector-icons");
const icoMoonConfig = require("../assets/fonts/config.json");

export const Icon = createIconSetFromIcoMoon(icoMoonConfig);
const margin = 20;
const styles = StyleSheet.create({
  image: {
    resizeMode: "contain",
  },
  button: {
    borderRadius: 15,
    overflow: "hidden",
  },
  pen: {
    marginRight: margin,
  },
  toolsBar: {
    flexDirection: "row",
    justifyContent: "space-around",
  },
github creativetimofficial / argon-react-native / components / Icon.js View on Github external
import React from 'react';
import * as Font from 'expo-font';
import { createIconSetFromIcoMoon } from '@expo/vector-icons';
import { Icon } from 'galio-framework';

import argonConfig from '../assets/font/argon.json';
const ArgonExtra = require('../assets/font/argon.ttf');
const IconArgonExtra = createIconSetFromIcoMoon(argonConfig, 'ArgonExtra');

class IconExtra extends React.Component {
  state = {
    fontLoaded: false,
  }

  async componentDidMount() {
    await Font.loadAsync({ ArgonExtra: ArgonExtra });
    this.setState({ fontLoaded: true });
  }

  render() {
    const { name, family, ...rest } = this.props;
    
    if (name && family && this.state.fontLoaded) {
      if (family === 'ArgonExtra') {
github creativetimofficial / material-kit-react-native / components / Icon.js View on Github external
import React from 'react';
import * as Font from 'expo-font';
import { createIconSetFromIcoMoon } from '@expo/vector-icons';
import { Icon } from 'galio-framework';

import GalioConfig from '../assets/fonts/galioExtra';

const GalioExtra = require('../assets/fonts/galioExtra.ttf');
const IconGalioExtra = createIconSetFromIcoMoon(GalioConfig, 'GalioExtra');

export default class IconExtra extends React.Component {
  state = {
    fontLoaded: false,
  }

  async componentDidMount() {
    await Font.loadAsync({ GalioExtra: GalioExtra });
    this.setState({ fontLoaded: true });
  }

  render() {
    const { name, family, ...rest } = this.props;
    
    if (name && family && this.state.fontLoaded) {
      if (family === 'GalioExtra') {

@expo/vector-icons

Built-in support for 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.

MIT
Latest version published 2 years ago

Package Health Score

67 / 100
Full package analysis