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:
Jorge Cabiedes Acosta
2024-09-13 12:35:57 -07:00
committed by Facebook GitHub Bot
parent eaff327e0d
commit 6f84b63d64
4 changed files with 10 additions and 10 deletions
@@ -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,