From 1e4bf359eb5ccca05ad103b392ef9c9fd84d7d77 Mon Sep 17 00:00:00 2001 From: msl Date: Wed, 8 Nov 2017 10:55:32 -0800 Subject: [PATCH 1/3] ButtonProps iconRight: ButtonIcon, not boolean Details: *Type of iconRight in ButtonProps should be a ButtonIcon, not boolean. *Button is expecting iconRight prop to be a ButtonIcon and will render it appropriately. *Currently, setting iconRight to a boolean causes error "In this environment the sources for assign MUST be an object." --- types/react-native-elements/index.d.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/types/react-native-elements/index.d.ts b/types/react-native-elements/index.d.ts index 3ed093d85f..e9882ce155 100644 --- a/types/react-native-elements/index.d.ts +++ b/types/react-native-elements/index.d.ts @@ -255,11 +255,9 @@ export interface ButtonProps extends TouchableWithoutFeedbackProps { fontWeight?: string; /** - * Moves icon to right of title - * - * @default false + * Icon configuration */ - iconRight?: boolean; + iconRight?: ButtonIcon; /** * onPress method From 82180fdf2ee3295b8283bdc02b6f8448c80e5f1b Mon Sep 17 00:00:00 2001 From: msl Date: Wed, 8 Nov 2017 10:57:35 -0800 Subject: [PATCH 2/3] Added comment to iconRight in ButtonProps --- types/react-native-elements/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-native-elements/index.d.ts b/types/react-native-elements/index.d.ts index e9882ce155..a880dad13f 100644 --- a/types/react-native-elements/index.d.ts +++ b/types/react-native-elements/index.d.ts @@ -255,7 +255,7 @@ export interface ButtonProps extends TouchableWithoutFeedbackProps { fontWeight?: string; /** - * Icon configuration + * Icon configuration for icon on right side of title */ iconRight?: ButtonIcon; From 3340210616e780c45b274a41aa043e217ce8cbcb Mon Sep 17 00:00:00 2001 From: Mike Liu Date: Wed, 8 Nov 2017 14:34:37 -0800 Subject: [PATCH 3/3] Edited test file to reflect change to iconRight type for ButtonProps --- types/react-native-elements/react-native-elements-tests.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/types/react-native-elements/react-native-elements-tests.tsx b/types/react-native-elements/react-native-elements-tests.tsx index b6a8ba8c83..29155829b2 100644 --- a/types/react-native-elements/react-native-elements-tests.tsx +++ b/types/react-native-elements/react-native-elements-tests.tsx @@ -222,8 +222,7 @@ class ButtonTest extends React.Component {