From c31b42aaa245caaec5825a612d776d47122cb115 Mon Sep 17 00:00:00 2001 From: Pieter De Baets Date: Mon, 9 Dec 2024 10:20:12 -0800 Subject: [PATCH] Fix flow-type of selectionColor (#48184) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/48184 Changelog: [Internal] Reviewed By: SamChou19815 Differential Revision: D66962089 fbshipit-source-id: cd45784d830a12a620800290235a5a1cad3097f3 --- packages/react-native/Libraries/Text/TextProps.js | 4 ++-- .../Libraries/__tests__/__snapshots__/public-api-test.js.snap | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-native/Libraries/Text/TextProps.js b/packages/react-native/Libraries/Text/TextProps.js index d3f8b33fcbb..0ab804181b5 100644 --- a/packages/react-native/Libraries/Text/TextProps.js +++ b/packages/react-native/Libraries/Text/TextProps.js @@ -17,7 +17,7 @@ import type { AccessibilityState, Role, } from '../Components/View/ViewAccessibility'; -import type {TextStyleProp} from '../StyleSheet/StyleSheet'; +import type {ColorValue, TextStyleProp} from '../StyleSheet/StyleSheet'; import type { LayoutEvent, PointerEvent, @@ -212,7 +212,7 @@ export type TextProps = $ReadOnly<{ * * See https://reactnative.dev/docs/text#selectioncolor */ - selectionColor?: ?string, + selectionColor?: ?ColorValue, dataDetectorType?: ?('phoneNumber' | 'link' | 'email' | 'none' | 'all'), diff --git a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap index 425c97d3810..ad43dce3894 100644 --- a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap +++ b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap @@ -8574,7 +8574,7 @@ export type TextProps = $ReadOnly<{ style?: ?TextStyleProp, testID?: ?string, disabled?: ?boolean, - selectionColor?: ?string, + selectionColor?: ?ColorValue, dataDetectorType?: ?(\\"phoneNumber\\" | \\"link\\" | \\"email\\" | \\"none\\" | \\"all\\"), textBreakStrategy?: ?(\\"balanced\\" | \\"highQuality\\" | \\"simple\\"), adjustsFontSizeToFit?: ?boolean,