mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-06-12 17:48:08 +08:00
Standard Flow type for style prop
Reviewed By: sahrens Differential Revision: D5978082 fbshipit-source-id: bd251ed3ecc1f15595e2f5ee941e3865a225c1fd
This commit is contained in:
committed by
Facebook Github Bot
parent
d0260b4f35
commit
9c29ee1504
@@ -20,6 +20,8 @@ const flatten = require('flattenStyle');
|
||||
|
||||
export type Styles = {[key: string]: Object};
|
||||
export type StyleSheet<S: Styles> = {[key: $Keys<S>]: number};
|
||||
export type StyleValue = {[key: string]: Object} | number | false | null;
|
||||
export type StyleProp = StyleValue | Array<StyleValue>;
|
||||
|
||||
let hairlineWidth = PixelRatio.roundToNearestPixel(0.4);
|
||||
if (hairlineWidth === 0) {
|
||||
|
||||
Reference in New Issue
Block a user