File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
packages/react-native-reanimated/src/css/platform/web/style Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -9,13 +9,8 @@ import { processColor } from '../processors';
9
9
10
10
type ShadowOffset = NonNullable < ViewStyle [ 'shadowOffset' ] > ;
11
11
12
- const processShadowOffset : ValueProcessor <
13
- ShadowOffset ,
14
- Record < string , string > | string
15
- > = ( value ) => ( {
16
- width : `${ value . width } px` ,
17
- height : `${ value . height } px` ,
18
- } ) ;
12
+ const processShadowOffset : ValueProcessor < ShadowOffset , string > = ( value ) =>
13
+ `${ value . width } px ${ value . height } px` ;
19
14
20
15
type BoxShadowProps = Pick <
21
16
ViewStyle ,
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
import type { ColorValue } from 'react-native' ;
3
3
4
+ import { convertToRGBA , rgbaArrayToRGBAColor } from '../../../../../Colors' ;
5
+ import { isNumber } from '../../../../utils' ;
4
6
import type { ValueProcessor } from '../types' ;
5
7
6
8
export const processColor : ValueProcessor < ColorValue > = ( value ) => {
9
+ if ( isNumber ( value ) ) {
10
+ const rgbaArray = convertToRGBA ( value ) ;
11
+ return rgbaArrayToRGBAColor ( rgbaArray ) ;
12
+ }
13
+
7
14
if ( typeof value !== 'string' ) {
8
15
return ;
9
16
}
You can’t perform that action at this time.
0 commit comments