UNPKG

rn-custom-style-sheet

Version:

React Native component to select a specific value from a range of values.

87 lines (83 loc) 2.98 kB
const shortHandLayoutProperties = { w: ['width'], h: ['height'], minW: ['minWidth'], minH: ['minHeight'], maxW: ['maxWidth'], maxH: ['maxHeight'], size: ['width', 'height'], minSize: ['minWidth', 'minHeight'], maxSize: ['maxWidth', 'maxHeight'] }; const shortHandSpaceProperties = { m: ['margin'], mt: ['marginTop'], mr: ['marginRight'], mb: ['marginBottom'], ml: ['marginLeft'], marginX: ['marginLeft', 'marginRight'], mx: ['marginLeft', 'marginRight'], marginY: ['marginTop', 'marginBottom'], my: ['marginTop', 'marginBottom'], p: ['padding'], pt: ['paddingTop'], pr: ['paddingRight'], pb: ['paddingBottom'], pl: ['paddingLeft'], paddingX: ['paddingLeft', 'paddingRight'], px: ['paddingLeft', 'paddingRight'], paddingY: ['paddingTop', 'paddingBottom'], py: ['paddingTop', 'paddingBottom'] }; const shortHandColorProperties = { bg: ['backgroundColor'], bgColor: ['backgroundColor'], background: ['backgroundColor'], borderColorX: ['borderLeftColor', 'borderRightColor'], borderColorY: ['borderTopColor', 'borderBottomColor'] }; const shortHandBorderProperties = { borderTopRadius: ['borderTopLeftRadius', 'borderTopRightRadius'], borderLeftRadius: ['borderTopLeftRadius', 'borderBottomLeftRadius'], borderRightRadius: ['borderTopRightRadius', 'borderBottomRightRadius'], borderBottomRadius: ['borderBottomLeftRadius', 'borderBottomRightRadius'], rounded: ['borderRadius'], roundedTopLeft: ['borderTopLeftRadius'], roundedTopRight: ['borderTopRightRadius'], roundedBottomLeft: ['borderBottomLeftRadius'], roundedBottomRight: ['borderBottomRightRadius'], roundedTop: ['borderTopLeftRadius', 'borderTopRightRadius'], roundedLeft: ['borderTopLeftRadius', 'borderBottomLeftRadius'], roundedRight: ['borderTopRightRadius', 'borderBottomRightRadius'], roundedBottom: ['borderBottomLeftRadius', 'borderBottomRightRadius'], borderWidthX: ['borderLeftWidth', 'borderRightWidth'], borderWidthY: ['borderTopWidth', 'borderBottomWidth'] }; export const shortHandOtherProperties = { flexDir: ['flexDirection'], weight: ['fontWeight'] }; export const ShortHandProperties = { ...shortHandLayoutProperties, ...shortHandSpaceProperties, ...shortHandColorProperties, ...shortHandBorderProperties, ...shortHandOtherProperties }; /** * Flex Prop Types * @see https://reactnative.dev/docs/flexbox#proptypes * @see https://reactnative.dev/docs/layout-props * @see https://github.com/facebook/react-native/blob/master/Libraries/StyleSheet/LayoutPropTypes.js */ /** * @see https://reactnative.dev/docs/view#style * @see https://github.com/facebook/react-native/blob/master/Libraries/Components/View/ViewStylePropTypes.js */ // @see https://reactnative.dev/docs/text#style /** * Image style * @see https://reactnative.dev/docs/image#style * @see https://github.com/facebook/react-native/blob/master/Libraries/Image/ImageStylePropTypes.js */ //# sourceMappingURL=ScaleTypes.js.map