Summary: Adding type declaration for glyphs

Reviewed By: passy

Differential Revision: D17096295

fbshipit-source-id: e8994e0c81c3668fa909479dbaea613ec2b86dc4
This commit is contained in:
Daniel Büchele
2019-08-28 19:49:29 -07:00
committed by Facebook Github Bot
parent bc4fc12ea4
commit 9970c50daf
2 changed files with 19 additions and 1 deletions

View File

@@ -20,7 +20,7 @@ const ColoredIconBlack = styled('img')(({size}: {size: number}) => ({
}));
const ColoredIconCustom = styled('div')(
(props: {size: number; color: string; src: string}) => ({
(props: {size: number; color?: string; src: string}) => ({
height: props.size,
verticalAlign: 'middle',
width: props.size,

18
src/utils/icons.d.ts vendored Normal file
View File

@@ -0,0 +1,18 @@
/**
* Copyright 2018-present Facebook.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* @format
*/
import {IconSize} from 'src/ui/components/Glyph';
declare function getIconURL(
name: string,
size?: IconSize,
density?: number,
): string;
declare const ICONS: {
[key: string]: Array<IconSize>;
};