mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Rename DropShadowPrimitive to DropShadowValue (#46476)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/46476 Keep the type naming consistent with examples like `DimensionValue`, `ColorValue`, etc. Changelog: [Internal] Reviewed By: NickGerleman Differential Revision: D62614579 fbshipit-source-id: 824ea9af17487a4459e8f39d9374e2e00452db43
This commit is contained in:
committed by
Facebook GitHub Bot
parent
eaff327e0d
commit
6f84b63d64
@@ -330,9 +330,9 @@ export type FilterFunction =
|
||||
| {opacity: number | string}
|
||||
| {saturate: number | string}
|
||||
| {sepia: number | string}
|
||||
| {dropShadow: DropShadowPrimitive | string};
|
||||
| {dropShadow: DropShadowValue | string};
|
||||
|
||||
export type DropShadowPrimitive = {
|
||||
export type DropShadowValue = {
|
||||
offsetX: number | string;
|
||||
offsetY: number | string;
|
||||
standardDeviation?: number | string | undefined;
|
||||
|
||||
@@ -700,9 +700,9 @@ export type FilterFunction =
|
||||
| {opacity: number | string}
|
||||
| {saturate: number | string}
|
||||
| {sepia: number | string}
|
||||
| {dropShadow: DropShadowPrimitive | string};
|
||||
| {dropShadow: DropShadowValue | string};
|
||||
|
||||
export type DropShadowPrimitive = {
|
||||
export type DropShadowValue = {
|
||||
offsetX: number | string,
|
||||
offsetY: number | string,
|
||||
standardDeviation?: number | string,
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
'use strict';
|
||||
|
||||
import type {ColorValue} from './StyleSheet';
|
||||
import type {DropShadowPrimitive, FilterFunction} from './StyleSheetTypes';
|
||||
import type {DropShadowValue, FilterFunction} from './StyleSheetTypes';
|
||||
|
||||
import processColor from './processColor';
|
||||
|
||||
@@ -179,7 +179,7 @@ function _getFilterAmount(filterName: string, filterArgs: mixed): ?number {
|
||||
}
|
||||
|
||||
function parseDropShadow(
|
||||
rawDropShadow: string | DropShadowPrimitive,
|
||||
rawDropShadow: string | DropShadowValue,
|
||||
): ?ParsedDropShadow {
|
||||
const dropShadow =
|
||||
typeof rawDropShadow === 'string'
|
||||
@@ -248,8 +248,8 @@ function parseDropShadow(
|
||||
return parsedDropShadow;
|
||||
}
|
||||
|
||||
function parseDropShadowString(rawDropShadow: string): ?DropShadowPrimitive {
|
||||
const dropShadow: DropShadowPrimitive = {
|
||||
function parseDropShadowString(rawDropShadow: string): ?DropShadowValue {
|
||||
const dropShadow: DropShadowValue = {
|
||||
offsetX: 0,
|
||||
offsetY: 0,
|
||||
};
|
||||
|
||||
@@ -8284,8 +8284,8 @@ export type FilterFunction =
|
||||
| { opacity: number | string }
|
||||
| { saturate: number | string }
|
||||
| { sepia: number | string }
|
||||
| { dropShadow: DropShadowPrimitive | string };
|
||||
export type DropShadowPrimitive = {
|
||||
| { dropShadow: DropShadowValue | string };
|
||||
export type DropShadowValue = {
|
||||
offsetX: number | string,
|
||||
offsetY: number | string,
|
||||
standardDeviation?: number | string,
|
||||
|
||||
Reference in New Issue
Block a user