From b0d2898fcde94c102aea8bf6f717e4f508319f32 Mon Sep 17 00:00:00 2001 From: Brent Vatne Date: Tue, 1 Dec 2020 20:44:14 -0800 Subject: [PATCH] Update color type --- src/createIconSet.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/createIconSet.tsx b/src/createIconSet.tsx index 5719b43..5908bb4 100644 --- a/src/createIconSet.tsx +++ b/src/createIconSet.tsx @@ -1,6 +1,6 @@ import * as Font from "expo-font"; import React, { ComponentClass } from "react"; -import { Text, TextProps, TouchableHighlightProps, ViewProps } from "react-native"; +import { Text, TextProps, TouchableHighlightProps, ViewProps, OpaqueColorValue } from "react-native"; import createIconSet from "./vendor/react-native-vector-icons/lib/create-icon-set"; import createIconButtonComponent from "./vendor/react-native-vector-icons/lib/icon-button"; @@ -27,10 +27,11 @@ export interface IconButtonProps extends ViewProps, Touch name: GLYPHS; /** - * Color of the icon + * Color of the icon. Can be a string or OpaqueColorValue (returned from + * PlatformColor(..)) * */ - color?: string; + color?: string | OpaqueColorValue; } export interface IconProps extends TextProps { @@ -50,10 +51,11 @@ export interface IconProps extends TextProps { name: GLYPHS; /** - * Color of the icon + * Color of the icon. Can be a string or OpaqueColorValue (returned from + * PlatformColor(..)) * */ - color?: string; + color?: string | OpaqueColorValue; } export type GlyphMap = { [K in G]: number }