mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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
This commit is contained in:
committed by
Facebook GitHub Bot
parent
894f6b3e74
commit
0a67133124
@@ -14,7 +14,7 @@ import RCTActionSheetManager from './NativeActionSheetManager';
|
||||
|
||||
const invariant = require('invariant');
|
||||
const processColor = require('../StyleSheet/processColor');
|
||||
import type {ColorValue} from '../StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../StyleSheet/StyleSheet';
|
||||
import type {ProcessedColorValue} from '../StyleSheet/processColor';
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,7 +16,7 @@ const StyleSheet = require('../../StyleSheet/StyleSheet');
|
||||
const View = require('../View/View');
|
||||
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
|
||||
import type {ViewProps} from '../View/ViewPropTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheet';
|
||||
|
||||
const PlatformActivityIndicator =
|
||||
Platform.OS === 'android'
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
import type {WithDefault} from '../../Types/CodegenTypes';
|
||||
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheet';
|
||||
import type {ViewProps} from '../View/ViewPropTypes';
|
||||
|
||||
import codegenNativeComponent from '../../Utilities/codegenNativeComponent';
|
||||
|
||||
@@ -21,7 +21,7 @@ const View = require('./View/View');
|
||||
const invariant = require('invariant');
|
||||
|
||||
import type {PressEvent} from '../Types/CoreEventTypes';
|
||||
import type {ColorValue} from '../StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../StyleSheet/StyleSheet';
|
||||
|
||||
type ButtonProps = $ReadOnly<{|
|
||||
/**
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
'use strict';
|
||||
|
||||
import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTypes';
|
||||
import type {ColorValue} from 'react-native/Libraries/StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from 'react-native/Libraries/StyleSheet/StyleSheet';
|
||||
import type {
|
||||
WithDefault,
|
||||
DirectEventHandler,
|
||||
|
||||
@@ -25,8 +25,7 @@ import AndroidDrawerLayoutNativeComponent, {
|
||||
|
||||
const DRAWER_STATES = ['Idle', 'Dragging', 'Settling'];
|
||||
|
||||
import type {ViewStyleProp} from '../../StyleSheet/StyleSheet';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue, ViewStyleProp} from '../../StyleSheet/StyleSheet';
|
||||
import type {DirectEventHandler} from '../../Types/CodegenTypes';
|
||||
import type {
|
||||
MeasureOnSuccessCallback,
|
||||
|
||||
@@ -22,7 +22,7 @@ import type {
|
||||
} from '../../Types/CodegenTypes';
|
||||
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
|
||||
import type {TextStyleProp} from '../../StyleSheet/StyleSheet';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheet';
|
||||
import type {ProcessedColorValue} from '../../StyleSheet/processColor';
|
||||
import type {ViewProps} from '../../Components/View/ViewPropTypes';
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import type {
|
||||
} from '../../Types/CodegenTypes';
|
||||
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
|
||||
import type {TextStyleProp} from '../../StyleSheet/StyleSheet';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheet';
|
||||
import type {ProcessedColorValue} from '../../StyleSheet/processColor';
|
||||
import type {ViewProps} from '../../Components/View/ViewPropTypes';
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ const React = require('react');
|
||||
const UnimplementedView = require('../UnimplementedViews/UnimplementedView');
|
||||
|
||||
import type {TextStyleProp} from '../../StyleSheet/StyleSheet';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheet';
|
||||
|
||||
const MODE_DIALOG = 'dialog';
|
||||
const MODE_DROPDOWN = 'dropdown';
|
||||
|
||||
@@ -21,9 +21,8 @@ import StyleSheet from '../../StyleSheet/StyleSheet';
|
||||
import invariant from 'invariant';
|
||||
import processColor from '../../StyleSheet/processColor';
|
||||
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import type {SyntheticEvent} from '../../Types/CoreEventTypes';
|
||||
import type {TextStyleProp} from '../../StyleSheet/StyleSheet';
|
||||
import type {ColorValue, TextStyleProp} from '../../StyleSheet/StyleSheet';
|
||||
|
||||
type PickerItemSelectSyntheticEvent = SyntheticEvent<
|
||||
$ReadOnly<{|
|
||||
|
||||
@@ -23,7 +23,7 @@ import RCTPickerNativeComponent, {
|
||||
Commands as PickerCommands,
|
||||
} from './RCTPickerNativeComponent';
|
||||
import type {TextStyleProp} from '../../StyleSheet/StyleSheet';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheet';
|
||||
import type {ProcessedColorValue} from '../../StyleSheet/processColor';
|
||||
import type {SyntheticEvent} from '../../Types/CoreEventTypes';
|
||||
import type {ViewProps} from '../View/ViewPropTypes';
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
import invariant from 'invariant';
|
||||
import {Commands} from '../View/ViewNativeComponent';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheet';
|
||||
import type {PressEvent} from '../../Types/CoreEventTypes';
|
||||
import {Platform, View, processColor} from 'react-native';
|
||||
import * as React from 'react';
|
||||
|
||||
@@ -15,7 +15,7 @@ const React = require('react');
|
||||
import ProgressBarAndroidNativeComponent from './ProgressBarAndroidNativeComponent';
|
||||
|
||||
import type {ViewProps} from '../View/ViewPropTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheet';
|
||||
|
||||
export type ProgressBarAndroidProps = $ReadOnly<{|
|
||||
...ViewProps,
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheet';
|
||||
import type {ViewProps} from '../View/ViewPropTypes';
|
||||
import type {Double, WithDefault} from '../../Types/CodegenTypes';
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ const StyleSheet = require('../../StyleSheet/StyleSheet');
|
||||
|
||||
import RCTProgressViewNativeComponent from './RCTProgressViewNativeComponent';
|
||||
import type {ImageSource} from '../../Image/ImageSource';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheet';
|
||||
import type {ViewProps} from '../View/ViewPropTypes';
|
||||
|
||||
type Props = $ReadOnly<{|
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
import type {Float, WithDefault} from '../../Types/CodegenTypes';
|
||||
import type {ImageSource} from '../../Image/ImageSource';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheet';
|
||||
import type {ViewProps} from '../View/ViewPropTypes';
|
||||
|
||||
import codegenNativeComponent from '../../Utilities/codegenNativeComponent';
|
||||
|
||||
@@ -22,7 +22,7 @@ import type {
|
||||
Int32,
|
||||
WithDefault,
|
||||
} from '../../Types/CodegenTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheet';
|
||||
import type {ViewProps} from '../View/ViewPropTypes';
|
||||
|
||||
type NativeProps = $ReadOnly<{|
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
'use strict';
|
||||
|
||||
import type {DirectEventHandler, WithDefault} from '../../Types/CodegenTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheet';
|
||||
import type {ViewProps} from '../View/ViewPropTypes';
|
||||
import * as React from 'react';
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
const Platform = require('../../Utilities/Platform');
|
||||
const React = require('react');
|
||||
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheet';
|
||||
import type {ViewProps} from '../View/ViewPropTypes';
|
||||
import AndroidSwipeRefreshLayoutNativeComponent, {
|
||||
Commands as AndroidSwipeRefreshLayoutCommands,
|
||||
|
||||
@@ -31,7 +31,7 @@ const setAndForwardRef = require('../../Utilities/setAndForwardRef');
|
||||
import type {EdgeInsetsProp} from '../../StyleSheet/EdgeInsetsPropType';
|
||||
import type {PointProp} from '../../StyleSheet/PointPropType';
|
||||
import type {ViewStyleProp} from '../../StyleSheet/StyleSheet';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheet';
|
||||
import type {
|
||||
PressEvent,
|
||||
ScrollEvent,
|
||||
|
||||
@@ -16,7 +16,7 @@ import type {
|
||||
ViewStyleProp,
|
||||
DangerouslyImpreciseStyle,
|
||||
} from '../../StyleSheet/StyleSheet';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheet';
|
||||
import type {EdgeInsetsProp} from '../../StyleSheet/EdgeInsetsPropType';
|
||||
import type {ScrollEvent} from '../../Types/CoreEventTypes';
|
||||
import type {PointProp} from '../../StyleSheet/PointPropType';
|
||||
|
||||
@@ -18,7 +18,7 @@ import type {
|
||||
WithDefault,
|
||||
Int32,
|
||||
} from '../../Types/CodegenTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheet';
|
||||
|
||||
export type OnChangeEvent = $ReadOnly<{|
|
||||
value: Int32,
|
||||
|
||||
@@ -17,7 +17,7 @@ const StyleSheet = require('../../StyleSheet/StyleSheet');
|
||||
|
||||
import type {ImageSource} from '../../Image/ImageSource';
|
||||
import type {ViewStyleProp} from '../../StyleSheet/StyleSheet';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheet';
|
||||
import type {ViewProps} from '../View/ViewPropTypes';
|
||||
import type {SyntheticEvent} from '../../Types/CoreEventTypes';
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import type {
|
||||
import codegenNativeComponent from '../../Utilities/codegenNativeComponent';
|
||||
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
|
||||
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheet';
|
||||
import type {ImageSource} from '../../Image/ImageSource';
|
||||
import type {ViewProps} from '../View/ViewPropTypes';
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ const React = require('react');
|
||||
|
||||
const invariant = require('invariant');
|
||||
const processColor = require('../../StyleSheet/processColor');
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheet';
|
||||
|
||||
import NativeStatusBarManagerAndroid from './NativeStatusBarManagerAndroid';
|
||||
import NativeStatusBarManagerIOS from './NativeStatusBarManagerIOS';
|
||||
|
||||
@@ -21,7 +21,7 @@ import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativ
|
||||
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
||||
import type {HostComponent} from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';
|
||||
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheet';
|
||||
import type {ViewProps} from '../View/ViewPropTypes';
|
||||
|
||||
type SwitchChangeEvent = $ReadOnly<{|
|
||||
|
||||
@@ -22,7 +22,7 @@ import SwitchNativeComponent, {
|
||||
Commands as SwitchCommands,
|
||||
} from './SwitchNativeComponent';
|
||||
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheet';
|
||||
import type {SyntheticEvent} from '../../Types/CoreEventTypes';
|
||||
import type {ViewProps} from '../View/ViewPropTypes';
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
'use strict';
|
||||
|
||||
import type {BubblingEventHandler, WithDefault} from '../../Types/CodegenTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheet';
|
||||
import type {ViewProps} from '../View/ViewPropTypes';
|
||||
import * as React from 'react';
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import type {
|
||||
} from '../../Types/CodegenTypes';
|
||||
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
|
||||
import type {TextStyleProp, ViewStyleProp} from '../../StyleSheet/StyleSheet';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheet';
|
||||
import requireNativeComponent from '../../ReactNative/requireNativeComponent';
|
||||
import codegenNativeCommands from '../../Utilities/codegenNativeCommands';
|
||||
import type {TextInputNativeCommands} from './TextInputNativeCommands';
|
||||
|
||||
@@ -17,7 +17,7 @@ const StyleSheet = require('../../StyleSheet/StyleSheet');
|
||||
import RCTInputAccessoryViewNativeComponent from './RCTInputAccessoryViewNativeComponent';
|
||||
|
||||
import type {ViewStyleProp} from '../../StyleSheet/StyleSheet';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheet';
|
||||
|
||||
/**
|
||||
* Note: iOS only
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheet';
|
||||
import type {ViewProps} from '../View/ViewPropTypes';
|
||||
|
||||
import codegenNativeComponent from '../../Utilities/codegenNativeComponent';
|
||||
|
||||
@@ -24,7 +24,7 @@ const nullthrows = require('nullthrows');
|
||||
const setAndForwardRef = require('../../Utilities/setAndForwardRef');
|
||||
|
||||
import type {TextStyleProp, ViewStyleProp} from '../../StyleSheet/StyleSheet';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheet';
|
||||
import type {ViewProps} from '../View/ViewPropTypes';
|
||||
import type {SyntheticEvent, ScrollEvent} from '../../Types/CoreEventTypes';
|
||||
import type {PressEvent} from '../../Types/CoreEventTypes';
|
||||
|
||||
@@ -15,7 +15,7 @@ import Pressability, {
|
||||
} from '../../Pressability/Pressability';
|
||||
import {PressabilityDebugView} from '../../Pressability/PressabilityDebug';
|
||||
import StyleSheet, {type ViewStyleProp} from '../../StyleSheet/StyleSheet';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../../StyleSheet/StyleSheet';
|
||||
import TVTouchable from './TVTouchable';
|
||||
import typeof TouchableWithoutFeedback from './TouchableWithoutFeedback';
|
||||
import Platform from '../../Utilities/Platform';
|
||||
|
||||
@@ -18,7 +18,7 @@ import type {HostComponent} from '../Renderer/shims/ReactNativeTypes';
|
||||
import type {ImageProps} from './ImageProps';
|
||||
import type {ViewProps} from '../Components/View/ViewPropTypes';
|
||||
import type {ImageStyleProp} from '../StyleSheet/StyleSheet';
|
||||
import type {ColorValue} from '../StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../StyleSheet/StyleSheet';
|
||||
|
||||
import ImageViewViewConfig from './ImageViewViewConfig';
|
||||
const ReactNativeViewConfigRegistry = require('../Renderer/shims/ReactNativeViewConfigRegistry');
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
'use strict';
|
||||
|
||||
import normalizeColor from '../StyleSheet/normalizeColor';
|
||||
import type {ColorValue} from '../StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../StyleSheet/StyleSheet';
|
||||
|
||||
import Touchable from '../Components/Touchable/Touchable';
|
||||
import View from '../Components/View/View';
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import type {ColorValue} from './StyleSheetTypes';
|
||||
import type {ColorValue} from './StyleSheet';
|
||||
import type {ProcessedColorValue} from './processColor';
|
||||
|
||||
export opaque type NativeColorValue = {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import type {ColorValue} from './StyleSheetTypes';
|
||||
import type {ColorValue} from './StyleSheet';
|
||||
import type {ProcessedColorValue} from './processColor';
|
||||
|
||||
export opaque type NativeColorValue = {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import type {ColorValue} from './StyleSheetTypes';
|
||||
import type {ColorValue} from './StyleSheet';
|
||||
import {DynamicColorIOSPrivate} from './PlatformColorValueTypes';
|
||||
|
||||
export type DynamicColorIOSTuple = {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import type {ColorValue} from './StyleSheetTypes';
|
||||
import type {ColorValue} from './StyleSheet';
|
||||
|
||||
export type DynamicColorIOSTuple = {
|
||||
light: ColorValue,
|
||||
|
||||
@@ -17,6 +17,7 @@ const StyleSheetValidation = require('./StyleSheetValidation');
|
||||
const flatten = require('./flattenStyle');
|
||||
|
||||
import type {
|
||||
____ColorValue_Internal,
|
||||
____Styles_Internal,
|
||||
____DangerouslyImpreciseStyle_Internal,
|
||||
____DangerouslyImpreciseStyleProp_Internal,
|
||||
@@ -28,6 +29,15 @@ import type {
|
||||
____ImageStyleProp_Internal,
|
||||
} from './StyleSheetTypes';
|
||||
|
||||
/**
|
||||
* This type should be used as the type for anything that is a color. It is
|
||||
* most useful when using DynamicColorIOS which can be a string or a dynamic
|
||||
* color object.
|
||||
*
|
||||
* type props = {backgroundColor: ColorValue};
|
||||
*/
|
||||
export type ColorValue = ____ColorValue_Internal;
|
||||
|
||||
/**
|
||||
* This type should be used as the type for a prop that is passed through
|
||||
* to a <View>'s `style` prop. This ensures call sites of the component
|
||||
|
||||
@@ -14,9 +14,9 @@ const AnimatedNode = require('../Animated/src/nodes/AnimatedNode');
|
||||
|
||||
import type {NativeColorValue} from './PlatformColorValueTypes';
|
||||
|
||||
export type ColorValue = null | string | NativeColorValue;
|
||||
export type ____ColorValue_Internal = null | string | NativeColorValue;
|
||||
|
||||
export type ColorArrayValue = null | $ReadOnlyArray<ColorValue>;
|
||||
export type ColorArrayValue = null | $ReadOnlyArray<____ColorValue_Internal>;
|
||||
export type PointValue = {|
|
||||
x: number,
|
||||
y: number,
|
||||
@@ -530,7 +530,7 @@ export type ____ShadowStyle_Internal = $ReadOnly<{|
|
||||
* Sets the drop shadow color
|
||||
* @platform ios
|
||||
*/
|
||||
shadowColor?: ColorValue,
|
||||
shadowColor?: ____ColorValue_Internal,
|
||||
/**
|
||||
* Sets the drop shadow offset
|
||||
* @platform ios
|
||||
@@ -556,14 +556,14 @@ export type ____ViewStyle_Internal = $ReadOnly<{|
|
||||
...$Exact<____ShadowStyle_Internal>,
|
||||
...$Exact<____TransformStyle_Internal>,
|
||||
backfaceVisibility?: 'visible' | 'hidden',
|
||||
backgroundColor?: ColorValue,
|
||||
borderColor?: ColorValue,
|
||||
borderBottomColor?: ColorValue,
|
||||
borderEndColor?: ColorValue,
|
||||
borderLeftColor?: ColorValue,
|
||||
borderRightColor?: ColorValue,
|
||||
borderStartColor?: ColorValue,
|
||||
borderTopColor?: ColorValue,
|
||||
backgroundColor?: ____ColorValue_Internal,
|
||||
borderColor?: ____ColorValue_Internal,
|
||||
borderBottomColor?: ____ColorValue_Internal,
|
||||
borderEndColor?: ____ColorValue_Internal,
|
||||
borderLeftColor?: ____ColorValue_Internal,
|
||||
borderRightColor?: ____ColorValue_Internal,
|
||||
borderStartColor?: ____ColorValue_Internal,
|
||||
borderTopColor?: ____ColorValue_Internal,
|
||||
borderRadius?: number | AnimatedNode,
|
||||
borderBottomEndRadius?: number | AnimatedNode,
|
||||
borderBottomLeftRadius?: number | AnimatedNode,
|
||||
@@ -600,7 +600,7 @@ export type ____FontWeight_Internal =
|
||||
|
||||
export type ____TextStyle_Internal = $ReadOnly<{|
|
||||
...$Exact<____ViewStyle_Internal>,
|
||||
color?: ColorValue,
|
||||
color?: ____ColorValue_Internal,
|
||||
fontFamily?: string,
|
||||
fontSize?: number,
|
||||
fontStyle?: 'normal' | 'italic',
|
||||
@@ -617,7 +617,7 @@ export type ____TextStyle_Internal = $ReadOnly<{|
|
||||
height: number,
|
||||
|}>,
|
||||
textShadowRadius?: number,
|
||||
textShadowColor?: ColorValue,
|
||||
textShadowColor?: ____ColorValue_Internal,
|
||||
letterSpacing?: number,
|
||||
lineHeight?: number,
|
||||
textAlign?: 'auto' | 'left' | 'right' | 'center' | 'justify',
|
||||
@@ -629,7 +629,7 @@ export type ____TextStyle_Internal = $ReadOnly<{|
|
||||
| 'line-through'
|
||||
| 'underline line-through',
|
||||
textDecorationStyle?: 'solid' | 'double' | 'dotted' | 'dashed',
|
||||
textDecorationColor?: ColorValue,
|
||||
textDecorationColor?: ____ColorValue_Internal,
|
||||
textTransform?: 'none' | 'capitalize' | 'uppercase' | 'lowercase',
|
||||
writingDirection?: 'auto' | 'ltr' | 'rtl',
|
||||
|}>;
|
||||
@@ -637,14 +637,14 @@ export type ____TextStyle_Internal = $ReadOnly<{|
|
||||
export type ____ImageStyle_Internal = $ReadOnly<{|
|
||||
...$Exact<____ViewStyle_Internal>,
|
||||
resizeMode?: 'contain' | 'cover' | 'stretch' | 'center' | 'repeat',
|
||||
tintColor?: ColorValue,
|
||||
tintColor?: ____ColorValue_Internal,
|
||||
overlayColor?: string,
|
||||
|}>;
|
||||
|
||||
export type ____DangerouslyImpreciseStyle_Internal = {
|
||||
...$Exact<____TextStyle_Internal>,
|
||||
+resizeMode?: 'contain' | 'cover' | 'stretch' | 'center' | 'repeat',
|
||||
+tintColor?: ColorValue,
|
||||
+tintColor?: ____ColorValue_Internal,
|
||||
+overlayColor?: string,
|
||||
...
|
||||
};
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import type {ColorValue} from './StyleSheetTypes';
|
||||
import type {ColorValue} from './StyleSheet';
|
||||
import type {ProcessedColorValue} from './processColor';
|
||||
|
||||
function normalizeColor(
|
||||
|
||||
@@ -14,7 +14,7 @@ const Platform = require('../Utilities/Platform');
|
||||
|
||||
const normalizeColor = require('./normalizeColor');
|
||||
|
||||
import type {ColorValue} from './StyleSheetTypes';
|
||||
import type {ColorValue} from './StyleSheet';
|
||||
import type {NativeColorValue} from './PlatformColorValueTypes';
|
||||
|
||||
export type ProcessedColorValue = number | NativeColorValue;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
const processColor = require('./processColor');
|
||||
|
||||
import type {ColorValue} from './StyleSheetTypes';
|
||||
import type {ColorValue} from './StyleSheet';
|
||||
import type {ProcessedColorValue} from './processColor';
|
||||
|
||||
function processColorArray(
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
import * as React from 'react';
|
||||
import {Appearance} from 'react-native';
|
||||
import type {ColorValue} from '../../../Libraries/StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from 'react-native/Libraries/StyleSheet/StyleSheet';
|
||||
|
||||
export type RNTesterTheme = {
|
||||
LabelColor: ColorValue,
|
||||
|
||||
Vendored
+1
-1
@@ -12,9 +12,9 @@
|
||||
|
||||
import type {
|
||||
PointValue,
|
||||
ColorValue,
|
||||
EdgeInsetsValue,
|
||||
} from '../../../../../Libraries/StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../../../../../Libraries/StyleSheet/StyleSheet';
|
||||
import type {ImageSource} from '../../../../../Libraries/Image/ImageSource';
|
||||
import type {
|
||||
Int32,
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import type {ColorValue} from '../../../../../Libraries/StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../../../../../Libraries/StyleSheet/StyleSheet';
|
||||
import type {ViewProps} from '../../../../../Libraries/Components/View/ViewPropTypes';
|
||||
import codegenNativeComponent from '../../../../../Libraries/Utilities/codegenNativeComponent';
|
||||
import type {HostComponent} from '../../../../../Libraries/Renderer/shims/ReactNativeTypes';
|
||||
|
||||
Vendored
+2
-4
@@ -10,10 +10,8 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import type {
|
||||
PointValue,
|
||||
ColorValue,
|
||||
} from '../../../../../Libraries/StyleSheet/StyleSheetTypes';
|
||||
import type {PointValue} from '../../../../../Libraries/StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../../../../../Libraries/StyleSheet/StyleSheet';
|
||||
import type {ImageSource} from '../../../../../Libraries/Image/ImageSource';
|
||||
import type {ViewProps} from '../../../../../Libraries/Components/View/ViewPropTypes';
|
||||
import codegenNativeComponent from '../../../../../Libraries/Utilities/codegenNativeComponent';
|
||||
|
||||
Vendored
+2
-4
@@ -12,10 +12,8 @@
|
||||
|
||||
import type {ViewProps} from '../../../../../Libraries/Components/View/ViewPropTypes';
|
||||
import type {ImageSource} from '../../../../../Libraries/Image/ImageSource';
|
||||
import type {
|
||||
PointValue,
|
||||
ColorValue,
|
||||
} from '../../../../../Libraries/StyleSheet/StyleSheetTypes';
|
||||
import type {PointValue} from '../../../../../Libraries/StyleSheet/StyleSheetTypes';
|
||||
import type {ColorValue} from '../../../../../Libraries/StyleSheet/StyleSheet';
|
||||
import type {
|
||||
Int32,
|
||||
Float,
|
||||
|
||||
Reference in New Issue
Block a user