UNPKG

apeman-react-touchable

Version:
42 lines (34 loc) 825 B
/** * Style for ApTouchable. * @class ApTouchableStyle */ 'use strict' import React, { Component } from 'react' import { ApStyle } from 'apeman-react-style' /** @lends ApTouchableStyle */ class ApTouchableStyle extends Component { render () { const s = this let { props } = s let { all, small, medium, large } = ApTouchableStyle.styleData(props) return ( <ApStyle data={ Object.assign(all, props.style) } smallMediaData={ small } mediumMediaData={ medium } largeMediaData={ large } >{ props.children }</ApStyle> ) } } Object.assign(ApTouchableStyle, { propTypes: ApStyle.propTypes, defaultProps: {}, styleData (config) { return { all: { '.ap-touchable': {} } } } }) export default ApTouchableStyle