// // Common PropTypes definition // // Created by ywu on 15/7/16. // import PropTypes from 'prop-types'; import { Text } from 'react-native'; // ----------- // ## Data types //
Dimension
export const dimen = PropTypes.shape({ height: PropTypes.number, width: PropTypes.number, }); //
Font
export const font = PropTypes.shape({ color: PropTypes.string, fontFamily: PropTypes.string, fontSize: PropTypes.number, // @ts-ignore fontStyle: Text.propTypes.style.fontStyle, // @ts-ignore fontWeight: Text.propTypes.style.fontWeight, }); //
Ripple hot-spot location
export const rippleLocation = PropTypes.oneOf([ 'tapLocation', 'center', // 'left', // 'right', ]); //
Ripple hot-spot location
export type RippleLocation = 'tapLocation' | 'center'