Skip to content

Commit

Permalink
fix: font variant typings (#42760)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ankit-tailor authored and facebook-github-bot committed Jan 31, 2024
1 parent 841e00e commit 8fca1c5
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions packages/react-native/Libraries/StyleSheet/StyleSheetTypes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,15 +281,35 @@ export type FontVariant =
| 'oldstyle-nums'
| 'lining-nums'
| 'tabular-nums'
| 'proportional-nums'
| 'common-ligatures'
| 'no-common-ligatures'
| 'discretionary-ligatures'
| 'no-discretionary-ligatures'
| 'historical-ligatures'
| 'no-historical-ligatures'
| 'contextual'
| 'no-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';
export interface TextStyleIOS extends ViewStyle {
fontVariant?: FontVariant[] | undefined;
textDecorationColor?: ColorValue | undefined;
Expand Down

0 comments on commit 8fca1c5

Please sign in to comment.