From 30ab7a45eceaa851e8af239f9b64bf7eec424952 Mon Sep 17 00:00:00 2001 From: MJMoshiri Date: Mon, 21 Aug 2023 05:19:23 -0700 Subject: [PATCH] add userSelect to TextStyles attributes (#39024) Summary: This PR addresses the missing userSelect style support in the TypeScript definitions. While support for userSelect was introduced in commit [fc42d5bbb9](https://github.com/facebook/react-native/commit/fc42d5bbb9906c37c2f62d26c46f6e3191cccd01), the associated TypeScript definitions were overlooked. This oversight led to issue https://github.com/facebook/react-native/issues/39015. This PR rectifies that by updating the type definitions accordingly. ## Changelog: [GENERAL] [FIXED] - Updated TypeScript definitions to include userSelect style support. Refer to commit [2e4d8b6c145](https://github.com/facebook/react-native/commit/2e4d8b6c145ed36b600a0481d7f65157a78abbeb) for the specific changes. Pull Request resolved: https://github.com/facebook/react-native/pull/39024 Reviewed By: rozele Differential Revision: D48412051 Pulled By: NickGerleman fbshipit-source-id: 425fc011af9052c8c4bde98e8524b7784493c546 --- packages/react-native/Libraries/StyleSheet/StyleSheetTypes.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-native/Libraries/StyleSheet/StyleSheetTypes.d.ts b/packages/react-native/Libraries/StyleSheet/StyleSheetTypes.d.ts index 7956766b34367a..8339fe2d20a52a 100644 --- a/packages/react-native/Libraries/StyleSheet/StyleSheetTypes.d.ts +++ b/packages/react-native/Libraries/StyleSheet/StyleSheetTypes.d.ts @@ -339,6 +339,7 @@ export interface TextStyle extends TextStyleIOS, TextStyleAndroid, ViewStyle { textShadowOffset?: {width: number; height: number} | undefined; textShadowRadius?: number | undefined; textTransform?: 'none' | 'capitalize' | 'uppercase' | 'lowercase' | undefined; + userSelect?: 'auto' | 'none' | 'text' | 'contain' | 'all' | undefined; } /**