From 4eb98006664dce237a4ddaacad56fe32e65f0810 Mon Sep 17 00:00:00 2001 From: Jesse Katsumata Date: Wed, 10 Apr 2024 16:27:03 +0900 Subject: [PATCH] fix: flowtype error (#563) --- js/PickerIOS.ios.js | 4 ++-- js/PickerMacOS.macos.js | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/js/PickerIOS.ios.js b/js/PickerIOS.ios.js index 817f0beca..913a83170 100644 --- a/js/PickerIOS.ios.js +++ b/js/PickerIOS.ios.js @@ -22,7 +22,7 @@ import type {SyntheticEvent} from 'react-native/Libraries/Types/CoreEventTypes'; import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; import type { ColorValue, - TextStyleProp, + ViewStyleProp, } from 'react-native/Libraries/StyleSheet/StyleSheet'; import type {Element, ChildrenArray} from 'react'; @@ -46,7 +46,7 @@ type Props = $ReadOnly<{| ...ViewProps, // $FlowFixMe children: ChildrenArray>, - itemStyle?: ?TextStyleProp, + itemStyle?: ?ViewStyleProp, numberOfLines: ?number, onChange?: ?(event: PickerIOSChangeEvent) => mixed, onValueChange?: ?(itemValue: string | number, itemIndex: number) => mixed, diff --git a/js/PickerMacOS.macos.js b/js/PickerMacOS.macos.js index dd5e25724..cce10fd35 100644 --- a/js/PickerMacOS.macos.js +++ b/js/PickerMacOS.macos.js @@ -21,7 +21,10 @@ import type {SyntheticEvent} from 'react-native/Libraries/Types/CoreEventTypes'; import type {ColorValue} from 'react-native/Libraries/StyleSheet/StyleSheet'; import type {ProcessedColorValue} from 'react-native/Libraries/StyleSheet/processColor'; import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes'; -import type {TextStyleProp} from 'react-native/Libraries/StyleSheet/StyleSheet'; +import type { + ViewStyleProp, + TextStyleProp, +} from 'react-native/Libraries/StyleSheet/StyleSheet'; import type {Element, ElementRef, ChildrenArray} from 'react'; import type {HostComponent} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes'; @@ -55,7 +58,7 @@ type Props = $ReadOnly<{| ...ViewProps, // $FlowFixMe children: ChildrenArray>, - itemStyle?: ?TextStyleProp, + itemStyle?: ?ViewStyleProp, onChange?: ?(event: PickerMacOSChangeEvent) => mixed, onValueChange?: ?(itemValue: string | number, itemIndex: number) => mixed, selectedValue: ?(number | string),