diff --git a/src/ui/components/Glyph.tsx b/src/ui/components/Glyph.tsx index 04c2193f8..f6f99ec05 100644 --- a/src/ui/components/Glyph.tsx +++ b/src/ui/components/Glyph.tsx @@ -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, diff --git a/src/utils/icons.d.ts b/src/utils/icons.d.ts new file mode 100644 index 000000000..4b8a1fd1c --- /dev/null +++ b/src/utils/icons.d.ts @@ -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; +};