Expose string types for boxShadow and filter (#45685)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45685

We built these to be able to parse web style string values, but the types only allow object form, and the TypeScript type is wrong.

Changelog: [Internal]

Reviewed By: joevilches

Differential Revision: D60263730

fbshipit-source-id: 7a6e93924a92e8e62346645cb4f8ab1a37dca34f
This commit is contained in:
Nick Gerleman
2024-07-27 11:39:27 -07:00
committed by Facebook GitHub Bot
parent a049a58790
commit 0c4df48ba4
3 changed files with 9 additions and 6 deletions
@@ -778,8 +778,8 @@ export type ____ViewStyle_InternalCore = $ReadOnly<{
elevation?: number,
pointerEvents?: 'auto' | 'none' | 'box-none' | 'box-only',
cursor?: CursorValue,
experimental_boxShadow?: $ReadOnlyArray<BoxShadowPrimitive>,
experimental_filter?: $ReadOnlyArray<FilterFunction>,
experimental_boxShadow?: $ReadOnlyArray<BoxShadowPrimitive> | string,
experimental_filter?: $ReadOnlyArray<FilterFunction> | string,
experimental_mixBlendMode?: ____BlendMode_Internal,
}>;
@@ -8487,8 +8487,8 @@ export type ____ViewStyle_InternalCore = $ReadOnly<{
elevation?: number,
pointerEvents?: \\"auto\\" | \\"none\\" | \\"box-none\\" | \\"box-only\\",
cursor?: CursorValue,
experimental_boxShadow?: $ReadOnlyArray<BoxShadowPrimitive>,
experimental_filter?: $ReadOnlyArray<FilterFunction>,
experimental_boxShadow?: $ReadOnlyArray<BoxShadowPrimitive> | string,
experimental_filter?: $ReadOnlyArray<FilterFunction> | string,
experimental_mixBlendMode?: ____BlendMode_Internal,
}>;
export type ____ViewStyle_Internal = $ReadOnly<{
+5 -2
View File
@@ -149,8 +149,11 @@ declare module '.' {
}
export interface ViewStyle {
experimental_boxShadow?: BoxShadowPrimitive | undefined;
experimental_filter?: ReadonlyArray<FilterFunction> | undefined;
experimental_boxShadow?:
| ReadonlyArray<BoxShadowPrimitive>
| string
| undefined;
experimental_filter?: ReadonlyArray<FilterFunction> | string | undefined;
experimental_mixBlendMode?: BlendMode | undefined;
}
}