React-native-web: is shadowSpread unimplemented?

Created on 2 Jun 2019  路  3Comments  路  Source: necolas/react-native-web

Most helpful comment

I'll remove it. I proposed internally that we replace the RN shadow props with these:

// boxShadow
type BoxShadowStyle = BoxShadow | Array<BoxShadow>;
// textShadow
type TextShadowStyle = BoxShadow | Array<BoxShadow>;

type BoxShadow = {
  color?: ?Color;
  spreadRadius?: ?number|string;
  blurRadius?: ?number|string;
  x?: ?number|string;
  y?: ?number|string
  inset?: ?boolean
};

type TextShadow = {
  color?: ?Color;
  blurRadius?: ?number|string;
  x?: ?number|string;
  y?: ?number|string
  inset?: ?boolean
};

That would support multiple shadows and additional features that make them as powerful as those on the web.

All 3 comments

I'll remove it. I proposed internally that we replace the RN shadow props with these:

// boxShadow
type BoxShadowStyle = BoxShadow | Array<BoxShadow>;
// textShadow
type TextShadowStyle = BoxShadow | Array<BoxShadow>;

type BoxShadow = {
  color?: ?Color;
  spreadRadius?: ?number|string;
  blurRadius?: ?number|string;
  x?: ?number|string;
  y?: ?number|string
  inset?: ?boolean
};

type TextShadow = {
  color?: ?Color;
  blurRadius?: ?number|string;
  x?: ?number|string;
  y?: ?number|string
  inset?: ?boolean
};

That would support multiple shadows and additional features that make them as powerful as those on the web.

This is fixed in the next branch

Was this page helpful?
0 / 5 - 0 ratings