File tree Expand file tree Collapse file tree
packages/react-strict-dom/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -452,6 +452,8 @@ export function props(
452452 // '::placeholder' polyfill
453453 else if (styleProp === 'placeholderTextColor') {
454454 nativeProps . placeholderTextColor = styleValue ;
455+ } else if (styleProp === 'backdropColor') {
456+ nativeProps . backdropColor = styleValue ;
455457 }
456458 // visibility polyfill
457459 // Note: we can't polyfill nested visibility changes
Original file line number Diff line number Diff line change @@ -79,7 +79,6 @@ export function processStyle(
7979 }
8080 continue ;
8181 }
82-
8382 // Object values
8483 else if ( typeof styleValue === 'object' && styleValue != null ) {
8584 if ( propName === '::placeholder' ) {
@@ -97,6 +96,21 @@ export function processStyle(
9796 }
9897 }
9998 continue ;
99+ } else if ( propName === '::backdrop' ) {
100+ const backdropStyleProps = Object . keys ( styleValue ) ;
101+ for ( let i = 0 ; i < backdropStyleProps . length ; i ++ ) {
102+ const prop = backdropStyleProps [ i ] ;
103+ if ( prop === 'backgroundColor' ) {
104+ result [ 'backdropColor' ] = processStyle ( {
105+ backgroundColor : styleValue . backgroundColor
106+ } ) . backgroundColor ;
107+ } else {
108+ if ( __DEV__ ) {
109+ warnMsg ( `unsupported "::backdrop" style property "${ prop } "` ) ;
110+ }
111+ }
112+ }
113+ continue ;
100114 } else if ( Object . hasOwn ( styleValue , 'default' ) ) {
101115 result [ propName ] = processStyle ( styleValue ) ;
102116 continue ;
Original file line number Diff line number Diff line change @@ -31,6 +31,10 @@ import type {
3131 // $FlowFixMe(nonstrict-import)
3232 ViewProps
3333} from 'react-native/Libraries/Components/View/ViewPropTypes' ;
34+ import type {
35+ // $FlowFixMe(nonstrict-import)
36+ ModalProps
37+ } from 'react-native/Libraries/Modal/Modal' ;
3438
3539type ReactNativeProps = {
3640 accessible ?: ViewProps [ 'accessible' ] ,
@@ -105,6 +109,7 @@ type ReactNativeProps = {
105109 onTouchMove ?: ViewProps [ 'onTouchMove' ] ,
106110 placeholder ?: TextInputProps [ 'placeholder' ] ,
107111 placeholderTextColor ?: TextInputProps [ 'placeholderTextColor' ] ,
112+ backdropColor ?: ModalProps [ 'backdropColor' ] ,
108113 pointerEvents ?: ViewProps [ 'pointerEvents' ] ,
109114 ref ?: $FlowFixMe ,
110115 referrerPolicy ?: ImageProps [ 'referrerPolicy' ] ,
You can’t perform that action at this time.
0 commit comments