Skip to content

Commit 9488e96

Browse files
jorge-cabfacebook-github-bot
authored andcommitted
Remove experimental_ prefix from boxShadow
Differential Revision: D62400814
1 parent 4014aa4 commit 9488e96

File tree

15 files changed

+23
-26
lines changed

15 files changed

+23
-26
lines changed

packages/react-native/Libraries/Components/View/ReactNativeStyleAttributes.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ const ReactNativeStyleAttributes: {[string]: AnyAttributeType, ...} = {
135135
/*
136136
* BoxShadow
137137
*/
138-
experimental_boxShadow: {process: processBoxShadow},
138+
boxShadow: {process: processBoxShadow},
139139

140140
/**
141141
* Linear Gradient

packages/react-native/Libraries/NativeComponent/BaseViewConfig.android.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ const validAttributesForNonEventProps = {
169169
experimental_backgroundImage: {
170170
process: require('../StyleSheet/processBackgroundImage').default,
171171
},
172-
experimental_boxShadow: {
172+
boxShadow: {
173173
process: require('../StyleSheet/processBoxShadow').default,
174174
},
175175
experimental_filter: {

packages/react-native/Libraries/NativeComponent/BaseViewConfig.ios.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ const validAttributesForNonEventProps = {
225225
experimental_filter: {
226226
process: require('../StyleSheet/processFilter').default,
227227
},
228-
experimental_boxShadow: {
228+
boxShadow: {
229229
process: require('../StyleSheet/processBoxShadow').default,
230230
},
231231
experimental_mixBlendMode: true,

packages/react-native/Libraries/StyleSheet/StyleSheetTypes.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ export interface ViewStyle extends FlexStyle, ShadowStyleIOS, TransformsStyle {
336336
pointerEvents?: 'box-none' | 'none' | 'box-only' | 'auto' | undefined;
337337
isolation?: 'auto' | 'isolate' | undefined;
338338
cursor?: CursorValue | undefined;
339+
boxShadow?: ReadonlyArray<BoxShadowPrimitive> | string | undefined;
339340
}
340341

341342
export type FontVariant =

packages/react-native/Libraries/StyleSheet/StyleSheetTypes.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ export type ____ViewStyle_InternalCore = $ReadOnly<{
788788
elevation?: number,
789789
pointerEvents?: 'auto' | 'none' | 'box-none' | 'box-only',
790790
cursor?: CursorValue,
791-
experimental_boxShadow?: $ReadOnlyArray<BoxShadowPrimitive> | string,
791+
boxShadow?: $ReadOnlyArray<BoxShadowPrimitive> | string,
792792
experimental_filter?: $ReadOnlyArray<FilterFunction> | string,
793793
experimental_mixBlendMode?: ____BlendMode_Internal,
794794
experimental_backgroundImage?: $ReadOnlyArray<GradientValue> | string,

packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -8357,7 +8357,7 @@ export type ____ViewStyle_InternalCore = $ReadOnly<{
83578357
elevation?: number,
83588358
pointerEvents?: \\"auto\\" | \\"none\\" | \\"box-none\\" | \\"box-only\\",
83598359
cursor?: CursorValue,
8360-
experimental_boxShadow?: $ReadOnlyArray<BoxShadowPrimitive> | string,
8360+
boxShadow?: $ReadOnlyArray<BoxShadowPrimitive> | string,
83618361
experimental_filter?: $ReadOnlyArray<FilterFunction> | string,
83628362
experimental_mixBlendMode?: ____BlendMode_Internal,
83638363
experimental_backgroundImage?: $ReadOnlyArray<GradientValue> | string,

packages/react-native/React/Views/RCTViewManager.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ - (void)updateAccessibilityTraitsForRole:(RCTView *)view withDefaultView:(RCTVie
438438
// filtered by view configs.
439439
}
440440

441-
RCT_CUSTOM_VIEW_PROPERTY(experimental_boxShadow, NSArray *, RCTView)
441+
RCT_CUSTOM_VIEW_PROPERTY(boxShadow, NSArray *, RCTView)
442442
{
443443
// Property is only to be used in the new renderer.
444444
// It is necessary to add it here, otherwise it gets

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewProps.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public object ViewProps {
136136
public const val BORDER_START_COLOR: String = "borderStartColor"
137137
public const val BORDER_END_COLOR: String = "borderEndColor"
138138
public const val ON_LAYOUT: String = "onLayout"
139-
public const val BOX_SHADOW: String = "experimental_boxShadow"
139+
public const val BOX_SHADOW: String = "boxShadow"
140140
public const val FILTER: String = "experimental_filter"
141141
public const val MIX_BLEND_MODE: String = "experimental_mixBlendMode"
142142
public const val TRANSFORM: String = "transform"

packages/react-native/ReactCommon/react/renderer/components/view/BaseViewProps.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ BaseViewProps::BaseViewProps(
155155
: convertRawProp(
156156
context,
157157
rawProps,
158-
"experimental_boxShadow",
158+
"boxShadow",
159159
sourceProps.boxShadow,
160160
{})),
161161
filter(
@@ -347,7 +347,7 @@ void BaseViewProps::setProp(
347347
RAW_SET_PROP_SWITCH_CASE_BASIC(experimental_layoutConformance);
348348
RAW_SET_PROP_SWITCH_CASE_BASIC(cursor);
349349
RAW_SET_PROP_SWITCH_CASE(filter, "experimental_filter");
350-
RAW_SET_PROP_SWITCH_CASE(boxShadow, "experimental_boxShadow");
350+
RAW_SET_PROP_SWITCH_CASE(boxShadow, "boxShadow");
351351
// events field
352352
VIEW_EVENT_CASE(PointerEnter);
353353
VIEW_EVENT_CASE(PointerEnterCapture);

packages/react-native/types/experimental.d.ts

-4
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,6 @@ declare module '.' {
150150
}
151151

152152
export interface ViewStyle {
153-
experimental_boxShadow?:
154-
| ReadonlyArray<BoxShadowPrimitive>
155-
| string
156-
| undefined;
157153
experimental_filter?: ReadonlyArray<FilterFunction> | string | undefined;
158154
experimental_mixBlendMode?: BlendMode | undefined;
159155
experimental_backgroundImage?:

packages/rn-tester/js/components/RNTPressableRow.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const styles = StyleSheet.create({
6969
paddingVertical: 16,
7070
marginVertical: 5,
7171
marginHorizontal: 16,
72-
experimental_boxShadow: '0 2px 4px -1px rgba(0, 0, 0, 0.25)',
72+
boxShadow: '0 2px 4px -1px rgba(0, 0, 0, 0.25)',
7373
borderRadius: 8,
7474
},
7575
descriptionText: {

packages/rn-tester/js/examples/Image/ImageExample.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -826,10 +826,10 @@ const styles = StyleSheet.create({
826826
},
827827
boxShadowWithBackground: {
828828
backgroundColor: 'lightblue',
829-
experimental_boxShadow: '0px 0px 10px 0px rgba(0, 0, 0, 0.5)',
829+
boxShadow: '0px 0px 10px 0px rgba(0, 0, 0, 0.5)',
830830
},
831831
boxShadowMultiOutsetInset: {
832-
experimental_boxShadow:
832+
boxShadow:
833833
'-5px -5px 10px 2px rgba(0, 128, 0, 0.5), 5px 5px 10px 2px rgba(128, 0, 0, 0.5), inset orange 0px 0px 20px 0px, black 0px 0px 5px 1px',
834834
borderColor: 'blue',
835835
borderWidth: 1,
@@ -842,7 +842,7 @@ const styles = StyleSheet.create({
842842
borderBottomLeftRadius: 20,
843843
marginRight: 80,
844844
marginTop: 40,
845-
experimental_boxShadow: '80px 0px 10px 0px hotpink',
845+
boxShadow: '80px 0px 10px 0px hotpink',
846846
transform: 'rotate(-15deg)',
847847
},
848848
vectorDrawableRow: {

packages/rn-tester/js/examples/Text/TextExample.android.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1444,7 +1444,7 @@ const examples = [
14441444
testID="text-box-shadow"
14451445
style={{
14461446
borderRadius: 10,
1447-
experimental_boxShadow: '0 0 10px red',
1447+
boxShadow: '0 0 10px red',
14481448
}}>
14491449
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
14501450
eiusmod tempor incididunt ut labore et dolore magna aliqua.

packages/rn-tester/js/examples/Text/TextExample.ios.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1438,7 +1438,7 @@ const examples = [
14381438
testID="text-box-shadow"
14391439
style={{
14401440
borderRadius: 10,
1441-
experimental_boxShadow: '0 0 10px red',
1441+
boxShadow: '0 0 10px red',
14421442
}}>
14431443
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
14441444
eiusmod tempor incididunt ut labore et dolore magna aliqua.

packages/rn-tester/js/examples/View/ViewExample.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ function BoxShadowExample(): React.Node {
464464
borderRadius: 10,
465465
borderWidth: 5,
466466
borderColor: 'red',
467-
experimental_boxShadow: '0 0 10px 0 black',
467+
boxShadow: '0 0 10px 0 black',
468468
}}
469469
/>
470470
<View
@@ -473,7 +473,7 @@ function BoxShadowExample(): React.Node {
473473
borderRadius: 30,
474474
borderWidth: 5,
475475
borderColor: 'red',
476-
experimental_boxShadow: 'inset 0 0 10px 0 black',
476+
boxShadow: 'inset 0 0 10px 0 black',
477477
}}
478478
/>
479479
<View
@@ -482,7 +482,7 @@ function BoxShadowExample(): React.Node {
482482
borderRadius: 30,
483483
borderWidth: 5,
484484
borderColor: 'red',
485-
experimental_boxShadow:
485+
boxShadow:
486486
'inset 15px -5px 5px 5px cyan, inset 15px -5px 20px 10px orange, -5px 5px 5px 0px green, 0px -10px 0px 5px black',
487487
}}
488488
/>
@@ -491,7 +491,7 @@ function BoxShadowExample(): React.Node {
491491
<View
492492
style={{
493493
...defaultStyleSize,
494-
experimental_boxShadow: '0px 0px 5px 5px black',
494+
boxShadow: '0px 0px 5px 5px black',
495495
}}>
496496
<View
497497
style={{
@@ -506,15 +506,15 @@ function BoxShadowExample(): React.Node {
506506
style={{
507507
...defaultStyleSize,
508508
backgroundColor: 'red',
509-
experimental_boxShadow: 'inset 0px 0px 5px 5px black',
509+
boxShadow: 'inset 0px 0px 5px 5px black',
510510
}}
511511
/>
512512
<View style={{...defaultStyleSize, flexDirection: 'row'}}>
513513
<View style={{width: 25, height: 25, backgroundColor: 'cyan'}} />
514514
<View
515515
style={{
516516
...defaultStyleSize,
517-
experimental_boxShadow: ' 0px 0px 20px 5px black',
517+
boxShadow: ' 0px 0px 20px 5px black',
518518
}}
519519
/>
520520
<View style={{width: 25, height: 25, backgroundColor: 'cyan'}} />
@@ -525,7 +525,7 @@ function BoxShadowExample(): React.Node {
525525
style={{
526526
...defaultStyleSize,
527527
backgroundColor: 'green',
528-
experimental_boxShadow: '0px 10px',
528+
boxShadow: '0px 10px',
529529
}}
530530
/>
531531
</View>

0 commit comments

Comments
 (0)