UNPKG

1.77 kBTypeScriptView Raw
1import * as React from "react";
2import { TextProps } from "react-native";
3import { Icon } from "./Icon";
4
5/**
6 * Returns your own custom font based on the glyphMap where the key is the icon name
7 * and the value is either a UTF-8 character or it's character code. fontFamily is the name
8 * of the font NOT the filename. Open the font in Font Book.app or similar to learn the name.
9 * Optionally pass the third fontFile argument for android support, it should be a path
10 * to the font file in you asset folder.
11 */
12export function createIconSet(
13 glyphMap: {},
14 fontFamily: string,
15 fontFile?: string,
16): typeof Icon;
17
18/**
19 * Convenience method to create a custom font based on a fontello config file.
20 * Don't forget to import the font as described above and drop the config.json
21 * somewhere convenient in your project.
22 *
23 * Example usage
24 * import { createIconSetFromFontello } from 'react-native-vector-icons';
25 * import fontelloConfig from './config.json';
26 * const Icon = createIconSetFromFontello(fontelloConfig);
27 *
28 * @see http://fontello.com
29 */
30export function createIconSetFromFontello(config: {}, fontName?: string, fontFile?: string): typeof Icon;
31
32/**
33 * Convenience method to create a custom font from IcoMoon
34 * Make sure you're using the Download option in IcoMoon, and use the .json file that's
35 * included in the .zip you've downloaded. You'll also need to import the .ttf font
36 * file into your project
37 *
38 * Example usage
39 * import { createIconSetFromIcoMoon } from 'react-native-vector-icons';
40 * import icoMoonConfig from './config.json';
41 * const Icon = createIconSetFromIcoMoon(icoMoonConfig);
42 *
43 * @see https://icomoon.io/app
44 */
45export function createIconSetFromIcoMoon(config: {}, fontName?: string, fontFile?: string): typeof Icon;