Skip to content

Commit cb4c351

Browse files
: Give THSpinner in .native themed coloring (#54456)
Summary: **__Context__**: - problem: loading indicator is always only 1 color. This means it can't be seen when its background color is light (depends on the background color used for example in a button, the button color can be the same as the indicator color) -- we need to offer a way to customize the indicator's color to effectively contrast the background **__Technical context__**: - css doesn't cascade and html.divs don't inherit css styles from parents in .native - THSpinner's xstyle (var(--...)) doesn't apply to the spinner indicator - this can be mutated through indicatorStyle & passing StyleSheet from react-native for 'color' - we let the caller decide the color theme/scheme because the caller is the one who decides the UI context in which the spinner appears (eg within a grey-ish or white button) **__This diff__**: - add indicatorStyles prop with dark and light mode to give caller the option to determine spinner color based on background of call Differential Revision: D86532694
1 parent 84ee4d4 commit cb4c351

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/react-native/Libraries/StyleSheet/StyleSheetTypes.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -878,6 +878,7 @@ export type ____ViewStyle_InternalBase = $ReadOnly<{
878878
borderRightWidth?: number,
879879
borderStartWidth?: number,
880880
borderTopWidth?: number,
881+
color?: ____ColorValue_Internal,
881882
opacity?: number,
882883
outlineColor?: ____ColorValue_Internal,
883884
outlineOffset?: number,

0 commit comments

Comments
 (0)