Skip to content

Commit 0a67133

Browse files
Zack Argylefacebook-github-bot
Zack Argyle
authored andcommitted
Make ColorValue public in StyleSheet.js
Summary: This diff makes the ColorValue export "official" by exporting it from StyleSheet in order to encourage its use in product code. Changelog: Moved ColorValue export from StyleSheetTypes to StyleSheet Reviewed By: TheSavior Differential Revision: D21076969 fbshipit-source-id: 972ef5a1b13bd9f6b7691a279a73168e7ce9d9ab
1 parent 894f6b3 commit 0a67133

File tree

49 files changed

+75
-71
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+75
-71
lines changed

Libraries/ActionSheetIOS/ActionSheetIOS.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import RCTActionSheetManager from './NativeActionSheetManager';
1414

1515
const invariant = require('invariant');
1616
const processColor = require('../StyleSheet/processColor');
17-
import type {ColorValue} from '../StyleSheet/StyleSheetTypes';
17+
import type {ColorValue} from '../StyleSheet/StyleSheet';
1818
import type {ProcessedColorValue} from '../StyleSheet/processColor';
1919

2020
/**

Libraries/Components/ActivityIndicator/ActivityIndicator.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const StyleSheet = require('../../StyleSheet/StyleSheet');
1616
const View = require('../View/View');
1717
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
1818
import type {ViewProps} from '../View/ViewPropTypes';
19-
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
19+
import type {ColorValue} from '../../StyleSheet/StyleSheet';
2020

2121
const PlatformActivityIndicator =
2222
Platform.OS === 'android'

Libraries/Components/ActivityIndicator/ActivityIndicatorViewNativeComponent.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import type {WithDefault} from '../../Types/CodegenTypes';
1414

15-
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
15+
import type {ColorValue} from '../../StyleSheet/StyleSheet';
1616
import type {ViewProps} from '../View/ViewPropTypes';
1717

1818
import codegenNativeComponent from '../../Utilities/codegenNativeComponent';

Libraries/Components/Button.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const View = require('./View/View');
2121
const invariant = require('invariant');
2222

2323
import type {PressEvent} from '../Types/CoreEventTypes';
24-
import type {ColorValue} from '../StyleSheet/StyleSheetTypes';
24+
import type {ColorValue} from '../StyleSheet/StyleSheet';
2525

2626
type ButtonProps = $ReadOnly<{|
2727
/**

Libraries/Components/DrawerAndroid/AndroidDrawerLayoutNativeComponent.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
'use strict';
1212

1313
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
14-
import type {ColorValue} from 'react-native/Libraries/StyleSheet/StyleSheetTypes';
14+
import type {ColorValue} from 'react-native/Libraries/StyleSheet/StyleSheet';
1515
import type {
1616
WithDefault,
1717
DirectEventHandler,

Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ import AndroidDrawerLayoutNativeComponent, {
2525

2626
const DRAWER_STATES = ['Idle', 'Dragging', 'Settling'];
2727

28-
import type {ViewStyleProp} from '../../StyleSheet/StyleSheet';
29-
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
28+
import type {ColorValue, ViewStyleProp} from '../../StyleSheet/StyleSheet';
3029
import type {DirectEventHandler} from '../../Types/CodegenTypes';
3130
import type {
3231
MeasureOnSuccessCallback,

Libraries/Components/Picker/AndroidDialogPickerNativeComponent.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import type {
2222
} from '../../Types/CodegenTypes';
2323
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
2424
import type {TextStyleProp} from '../../StyleSheet/StyleSheet';
25-
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
25+
import type {ColorValue} from '../../StyleSheet/StyleSheet';
2626
import type {ProcessedColorValue} from '../../StyleSheet/processColor';
2727
import type {ViewProps} from '../../Components/View/ViewPropTypes';
2828

Libraries/Components/Picker/AndroidDropdownPickerNativeComponent.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import type {
2222
} from '../../Types/CodegenTypes';
2323
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
2424
import type {TextStyleProp} from '../../StyleSheet/StyleSheet';
25-
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
25+
import type {ColorValue} from '../../StyleSheet/StyleSheet';
2626
import type {ProcessedColorValue} from '../../StyleSheet/processColor';
2727
import type {ViewProps} from '../../Components/View/ViewPropTypes';
2828

Libraries/Components/Picker/Picker.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const React = require('react');
1717
const UnimplementedView = require('../UnimplementedViews/UnimplementedView');
1818

1919
import type {TextStyleProp} from '../../StyleSheet/StyleSheet';
20-
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
20+
import type {ColorValue} from '../../StyleSheet/StyleSheet';
2121

2222
const MODE_DIALOG = 'dialog';
2323
const MODE_DROPDOWN = 'dropdown';

Libraries/Components/Picker/PickerAndroid.android.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ import StyleSheet from '../../StyleSheet/StyleSheet';
2121
import invariant from 'invariant';
2222
import processColor from '../../StyleSheet/processColor';
2323

24-
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
2524
import type {SyntheticEvent} from '../../Types/CoreEventTypes';
26-
import type {TextStyleProp} from '../../StyleSheet/StyleSheet';
25+
import type {ColorValue, TextStyleProp} from '../../StyleSheet/StyleSheet';
2726

2827
type PickerItemSelectSyntheticEvent = SyntheticEvent<
2928
$ReadOnly<{|

Libraries/Components/Picker/PickerIOS.ios.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import RCTPickerNativeComponent, {
2323
Commands as PickerCommands,
2424
} from './RCTPickerNativeComponent';
2525
import type {TextStyleProp} from '../../StyleSheet/StyleSheet';
26-
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
26+
import type {ColorValue} from '../../StyleSheet/StyleSheet';
2727
import type {ProcessedColorValue} from '../../StyleSheet/processColor';
2828
import type {SyntheticEvent} from '../../Types/CoreEventTypes';
2929
import type {ViewProps} from '../View/ViewPropTypes';

Libraries/Components/Pressable/useAndroidRippleForView.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import invariant from 'invariant';
1414
import {Commands} from '../View/ViewNativeComponent';
15-
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
15+
import type {ColorValue} from '../../StyleSheet/StyleSheet';
1616
import type {PressEvent} from '../../Types/CoreEventTypes';
1717
import {Platform, View, processColor} from 'react-native';
1818
import * as React from 'react';

Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.android.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const React = require('react');
1515
import ProgressBarAndroidNativeComponent from './ProgressBarAndroidNativeComponent';
1616

1717
import type {ViewProps} from '../View/ViewPropTypes';
18-
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
18+
import type {ColorValue} from '../../StyleSheet/StyleSheet';
1919

2020
export type ProgressBarAndroidProps = $ReadOnly<{|
2121
...ViewProps,

Libraries/Components/ProgressBarAndroid/ProgressBarAndroidNativeComponent.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
'use strict';
1212

13-
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
13+
import type {ColorValue} from '../../StyleSheet/StyleSheet';
1414
import type {ViewProps} from '../View/ViewPropTypes';
1515
import type {Double, WithDefault} from '../../Types/CodegenTypes';
1616

Libraries/Components/ProgressViewIOS/ProgressViewIOS.ios.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const StyleSheet = require('../../StyleSheet/StyleSheet');
1515

1616
import RCTProgressViewNativeComponent from './RCTProgressViewNativeComponent';
1717
import type {ImageSource} from '../../Image/ImageSource';
18-
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
18+
import type {ColorValue} from '../../StyleSheet/StyleSheet';
1919
import type {ViewProps} from '../View/ViewPropTypes';
2020

2121
type Props = $ReadOnly<{|

Libraries/Components/ProgressViewIOS/RCTProgressViewNativeComponent.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import type {Float, WithDefault} from '../../Types/CodegenTypes';
1414
import type {ImageSource} from '../../Image/ImageSource';
15-
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
15+
import type {ColorValue} from '../../StyleSheet/StyleSheet';
1616
import type {ViewProps} from '../View/ViewPropTypes';
1717

1818
import codegenNativeComponent from '../../Utilities/codegenNativeComponent';

Libraries/Components/RefreshControl/AndroidSwipeRefreshLayoutNativeComponent.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import type {
2222
Int32,
2323
WithDefault,
2424
} from '../../Types/CodegenTypes';
25-
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
25+
import type {ColorValue} from '../../StyleSheet/StyleSheet';
2626
import type {ViewProps} from '../View/ViewPropTypes';
2727

2828
type NativeProps = $ReadOnly<{|

Libraries/Components/RefreshControl/PullToRefreshViewNativeComponent.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
'use strict';
1212

1313
import type {DirectEventHandler, WithDefault} from '../../Types/CodegenTypes';
14-
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
14+
import type {ColorValue} from '../../StyleSheet/StyleSheet';
1515
import type {ViewProps} from '../View/ViewPropTypes';
1616
import * as React from 'react';
1717

Libraries/Components/RefreshControl/RefreshControl.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
const Platform = require('../../Utilities/Platform');
1414
const React = require('react');
1515

16-
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
16+
import type {ColorValue} from '../../StyleSheet/StyleSheet';
1717
import type {ViewProps} from '../View/ViewPropTypes';
1818
import AndroidSwipeRefreshLayoutNativeComponent, {
1919
Commands as AndroidSwipeRefreshLayoutCommands,

Libraries/Components/ScrollView/ScrollView.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const setAndForwardRef = require('../../Utilities/setAndForwardRef');
3131
import type {EdgeInsetsProp} from '../../StyleSheet/EdgeInsetsPropType';
3232
import type {PointProp} from '../../StyleSheet/PointPropType';
3333
import type {ViewStyleProp} from '../../StyleSheet/StyleSheet';
34-
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
34+
import type {ColorValue} from '../../StyleSheet/StyleSheet';
3535
import type {
3636
PressEvent,
3737
ScrollEvent,

Libraries/Components/ScrollView/ScrollViewNativeComponentType.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import type {
1616
ViewStyleProp,
1717
DangerouslyImpreciseStyle,
1818
} from '../../StyleSheet/StyleSheet';
19-
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
19+
import type {ColorValue} from '../../StyleSheet/StyleSheet';
2020
import type {EdgeInsetsProp} from '../../StyleSheet/EdgeInsetsPropType';
2121
import type {ScrollEvent} from '../../Types/CoreEventTypes';
2222
import type {PointProp} from '../../StyleSheet/PointPropType';

Libraries/Components/SegmentedControlIOS/RCTSegmentedControlNativeComponent.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import type {
1818
WithDefault,
1919
Int32,
2020
} from '../../Types/CodegenTypes';
21-
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
21+
import type {ColorValue} from '../../StyleSheet/StyleSheet';
2222

2323
export type OnChangeEvent = $ReadOnly<{|
2424
value: Int32,

Libraries/Components/Slider/Slider.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const StyleSheet = require('../../StyleSheet/StyleSheet');
1717

1818
import type {ImageSource} from '../../Image/ImageSource';
1919
import type {ViewStyleProp} from '../../StyleSheet/StyleSheet';
20-
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
20+
import type {ColorValue} from '../../StyleSheet/StyleSheet';
2121
import type {ViewProps} from '../View/ViewPropTypes';
2222
import type {SyntheticEvent} from '../../Types/CoreEventTypes';
2323

Libraries/Components/Slider/SliderNativeComponent.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import type {
2020
import codegenNativeComponent from '../../Utilities/codegenNativeComponent';
2121
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
2222

23-
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
23+
import type {ColorValue} from '../../StyleSheet/StyleSheet';
2424
import type {ImageSource} from '../../Image/ImageSource';
2525
import type {ViewProps} from '../View/ViewPropTypes';
2626

Libraries/Components/StatusBar/StatusBar.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const React = require('react');
1515

1616
const invariant = require('invariant');
1717
const processColor = require('../../StyleSheet/processColor');
18-
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
18+
import type {ColorValue} from '../../StyleSheet/StyleSheet';
1919

2020
import NativeStatusBarManagerAndroid from './NativeStatusBarManagerAndroid';
2121
import NativeStatusBarManagerIOS from './NativeStatusBarManagerIOS';

Libraries/Components/Switch/AndroidSwitchNativeComponent.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativ
2121
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
2222
import type {HostComponent} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';
2323

24-
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
24+
import type {ColorValue} from '../../StyleSheet/StyleSheet';
2525
import type {ViewProps} from '../View/ViewPropTypes';
2626

2727
type SwitchChangeEvent = $ReadOnly<{|

Libraries/Components/Switch/Switch.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import SwitchNativeComponent, {
2222
Commands as SwitchCommands,
2323
} from './SwitchNativeComponent';
2424

25-
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
25+
import type {ColorValue} from '../../StyleSheet/StyleSheet';
2626
import type {SyntheticEvent} from '../../Types/CoreEventTypes';
2727
import type {ViewProps} from '../View/ViewPropTypes';
2828

Libraries/Components/Switch/SwitchNativeComponent.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
'use strict';
1212

1313
import type {BubblingEventHandler, WithDefault} from '../../Types/CodegenTypes';
14-
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
14+
import type {ColorValue} from '../../StyleSheet/StyleSheet';
1515
import type {ViewProps} from '../View/ViewPropTypes';
1616
import * as React from 'react';
1717

Libraries/Components/TextInput/AndroidTextInputNativeComponent.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import type {
2121
} from '../../Types/CodegenTypes';
2222
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
2323
import type {TextStyleProp, ViewStyleProp} from '../../StyleSheet/StyleSheet';
24-
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
24+
import type {ColorValue} from '../../StyleSheet/StyleSheet';
2525
import requireNativeComponent from '../../ReactNative/requireNativeComponent';
2626
import codegenNativeCommands from '../../Utilities/codegenNativeCommands';
2727
import type {TextInputNativeCommands} from './TextInputNativeCommands';

Libraries/Components/TextInput/InputAccessoryView.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const StyleSheet = require('../../StyleSheet/StyleSheet');
1717
import RCTInputAccessoryViewNativeComponent from './RCTInputAccessoryViewNativeComponent';
1818

1919
import type {ViewStyleProp} from '../../StyleSheet/StyleSheet';
20-
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
20+
import type {ColorValue} from '../../StyleSheet/StyleSheet';
2121

2222
/**
2323
* Note: iOS only

Libraries/Components/TextInput/RCTInputAccessoryViewNativeComponent.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
'use strict';
1212

13-
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
13+
import type {ColorValue} from '../../StyleSheet/StyleSheet';
1414
import type {ViewProps} from '../View/ViewPropTypes';
1515

1616
import codegenNativeComponent from '../../Utilities/codegenNativeComponent';

Libraries/Components/TextInput/TextInput.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const nullthrows = require('nullthrows');
2424
const setAndForwardRef = require('../../Utilities/setAndForwardRef');
2525

2626
import type {TextStyleProp, ViewStyleProp} from '../../StyleSheet/StyleSheet';
27-
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
27+
import type {ColorValue} from '../../StyleSheet/StyleSheet';
2828
import type {ViewProps} from '../View/ViewPropTypes';
2929
import type {SyntheticEvent, ScrollEvent} from '../../Types/CoreEventTypes';
3030
import type {PressEvent} from '../../Types/CoreEventTypes';

Libraries/Components/Touchable/TouchableHighlight.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import Pressability, {
1515
} from '../../Pressability/Pressability';
1616
import {PressabilityDebugView} from '../../Pressability/PressabilityDebug';
1717
import StyleSheet, {type ViewStyleProp} from '../../StyleSheet/StyleSheet';
18-
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
18+
import type {ColorValue} from '../../StyleSheet/StyleSheet';
1919
import TVTouchable from './TVTouchable';
2020
import typeof TouchableWithoutFeedback from './TouchableWithoutFeedback';
2121
import Platform from '../../Utilities/Platform';

Libraries/Image/ImageViewNativeComponent.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import type {HostComponent} from '../Renderer/shims/ReactNativeTypes';
1818
import type {ImageProps} from './ImageProps';
1919
import type {ViewProps} from '../Components/View/ViewPropTypes';
2020
import type {ImageStyleProp} from '../StyleSheet/StyleSheet';
21-
import type {ColorValue} from '../StyleSheet/StyleSheetTypes';
21+
import type {ColorValue} from '../StyleSheet/StyleSheet';
2222

2323
import ImageViewViewConfig from './ImageViewViewConfig';
2424
const ReactNativeViewConfigRegistry = require('../Renderer/shims/ReactNativeViewConfigRegistry');

Libraries/Pressability/PressabilityDebug.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
'use strict';
1212

1313
import normalizeColor from '../StyleSheet/normalizeColor';
14-
import type {ColorValue} from '../StyleSheet/StyleSheetTypes';
14+
import type {ColorValue} from '../StyleSheet/StyleSheet';
1515

1616
import Touchable from '../Components/Touchable/Touchable';
1717
import View from '../Components/View/View';

Libraries/StyleSheet/PlatformColorValueTypes.android.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
'use strict';
1212

13-
import type {ColorValue} from './StyleSheetTypes';
13+
import type {ColorValue} from './StyleSheet';
1414
import type {ProcessedColorValue} from './processColor';
1515

1616
export opaque type NativeColorValue = {

Libraries/StyleSheet/PlatformColorValueTypes.ios.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
'use strict';
1212

13-
import type {ColorValue} from './StyleSheetTypes';
13+
import type {ColorValue} from './StyleSheet';
1414
import type {ProcessedColorValue} from './processColor';
1515

1616
export opaque type NativeColorValue = {

Libraries/StyleSheet/PlatformColorValueTypesIOS.ios.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
'use strict';
1212

13-
import type {ColorValue} from './StyleSheetTypes';
13+
import type {ColorValue} from './StyleSheet';
1414
import {DynamicColorIOSPrivate} from './PlatformColorValueTypes';
1515

1616
export type DynamicColorIOSTuple = {

Libraries/StyleSheet/PlatformColorValueTypesIOS.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
'use strict';
1212

13-
import type {ColorValue} from './StyleSheetTypes';
13+
import type {ColorValue} from './StyleSheet';
1414

1515
export type DynamicColorIOSTuple = {
1616
light: ColorValue,

Libraries/StyleSheet/StyleSheet.js

+10
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const StyleSheetValidation = require('./StyleSheetValidation');
1717
const flatten = require('./flattenStyle');
1818

1919
import type {
20+
____ColorValue_Internal,
2021
____Styles_Internal,
2122
____DangerouslyImpreciseStyle_Internal,
2223
____DangerouslyImpreciseStyleProp_Internal,
@@ -28,6 +29,15 @@ import type {
2829
____ImageStyleProp_Internal,
2930
} from './StyleSheetTypes';
3031

32+
/**
33+
* This type should be used as the type for anything that is a color. It is
34+
* most useful when using DynamicColorIOS which can be a string or a dynamic
35+
* color object.
36+
*
37+
* type props = {backgroundColor: ColorValue};
38+
*/
39+
export type ColorValue = ____ColorValue_Internal;
40+
3141
/**
3242
* This type should be used as the type for a prop that is passed through
3343
* to a <View>'s `style` prop. This ensures call sites of the component

0 commit comments

Comments
 (0)