rn-css 1.10.1 → 1.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -126,8 +126,12 @@ function cssChunkToStyle(css) {
126
126
  break;
127
127
  case 'boxShadow':
128
128
  case 'textShadow':
129
+ // To provide support for the 4th element (spread-radius) at least for web
130
+ if (react_native_1.Platform.OS === 'web')
131
+ Object.assign(result, { [key]: value });
129
132
  // We need to replace boxShadow by shadow
130
- Object.assign(result, (0, convert_1.shadow)(key === 'boxShadow' ? 'shadow' : key, value));
133
+ else
134
+ Object.assign(result, (0, convert_1.shadow)(key === 'boxShadow' ? 'shadow' : key, value));
131
135
  break;
132
136
  // Other keys don't require any special treatment
133
137
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rn-css",
3
- "version": "1.10.1",
3
+ "version": "1.10.2",
4
4
  "scripts": {
5
5
  "test": "jest",
6
6
  "prepare": "rm -rf dist && tsc",
@@ -1,4 +1,4 @@
1
- import { Dimensions } from 'react-native'
1
+ import { Dimensions, Platform } from 'react-native'
2
2
  import convertStyle from '../convertStyle'
3
3
  import { CompleteStyle, Context, PartialStyle, Style, Units } from '../types'
4
4
  import { sideValue, border, borderLike, cornerValue, font, textDecoration, shadow, placeContent, flex, flexFlow, transform, background } from './convert'
@@ -123,8 +123,10 @@ function cssChunkToStyle (css: string) {
123
123
  break
124
124
  case 'boxShadow':
125
125
  case 'textShadow':
126
+ // To provide support for the 4th element (spread-radius) at least for web
127
+ if (Platform.OS === 'web') Object.assign(result, { [key]: value })
126
128
  // We need to replace boxShadow by shadow
127
- Object.assign(result, shadow(key === 'boxShadow' ? 'shadow' : key, value))
129
+ else Object.assign(result, shadow(key === 'boxShadow' ? 'shadow' : key, value))
128
130
  break
129
131
  // Other keys don't require any special treatment
130
132
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment