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