Skip to content

Commit 8fca1c5

Browse files
ankit-tailorfacebook-github-bot
authored andcommittedJan 31, 2024·
fix: font variant typings (#42760)
Summary: This PR fixes the typings for `fontVariant` style prop. Flow file has below typings but they were missing in typescript file. ``` fontVariant?: | 'small-caps' | 'oldstyle-nums' | 'lining-nums' | 'tabular-nums' | 'common-ligatures' | 'no-common-ligatures' | 'discretionary-ligatures' | 'no-discretionary-ligatures' | 'historical-ligatures' | 'no-historical-ligatures' | 'contextual' | 'no-contextual' | 'proportional-nums' | 'stylistic-one' | 'stylistic-two' | 'stylistic-three' | 'stylistic-four' | 'stylistic-five' | 'stylistic-six' | 'stylistic-seven' | 'stylistic-eight' | 'stylistic-nine' | 'stylistic-ten' | 'stylistic-eleven' | 'stylistic-twelve' | 'stylistic-thirteen' | 'stylistic-fourteen' | 'stylistic-fifteen' | 'stylistic-sixteen' | 'stylistic-seventeen' | 'stylistic-eighteen' | 'stylistic-nineteen' | 'stylistic-twenty'; ``` ## Changelog: [GENERAL] [ADDED] - Added missing typings for fontVariant style prop. Pull Request resolved: #42760 Test Plan: Tested manually. Reviewed By: cortinico Differential Revision: D53263569 Pulled By: javache fbshipit-source-id: b127e0377cf9ceb50d094294d188f87a23038e5b
1 parent 841e00e commit 8fca1c5

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed
 

‎packages/react-native/Libraries/StyleSheet/StyleSheetTypes.d.ts

+22-2
Original file line numberDiff line numberDiff line change
@@ -281,15 +281,35 @@ export type FontVariant =
281281
| 'oldstyle-nums'
282282
| 'lining-nums'
283283
| 'tabular-nums'
284-
| 'proportional-nums'
285284
| 'common-ligatures'
286285
| 'no-common-ligatures'
287286
| 'discretionary-ligatures'
288287
| 'no-discretionary-ligatures'
289288
| 'historical-ligatures'
290289
| 'no-historical-ligatures'
291290
| 'contextual'
292-
| 'no-contextual';
291+
| 'no-contextual'
292+
| 'proportional-nums'
293+
| 'stylistic-one'
294+
| 'stylistic-two'
295+
| 'stylistic-three'
296+
| 'stylistic-four'
297+
| 'stylistic-five'
298+
| 'stylistic-six'
299+
| 'stylistic-seven'
300+
| 'stylistic-eight'
301+
| 'stylistic-nine'
302+
| 'stylistic-ten'
303+
| 'stylistic-eleven'
304+
| 'stylistic-twelve'
305+
| 'stylistic-thirteen'
306+
| 'stylistic-fourteen'
307+
| 'stylistic-fifteen'
308+
| 'stylistic-sixteen'
309+
| 'stylistic-seventeen'
310+
| 'stylistic-eighteen'
311+
| 'stylistic-nineteen'
312+
| 'stylistic-twenty';
293313
export interface TextStyleIOS extends ViewStyle {
294314
fontVariant?: FontVariant[] | undefined;
295315
textDecorationColor?: ColorValue | undefined;

0 commit comments

Comments
 (0)
Please sign in to comment.