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