UNPKG

apeman-react-touchable

Version:
59 lines (44 loc) 993 B
/** * apeman react package for touchable component. * @class ApTouchable */ 'use strict' import React, { PropTypes as types } from 'react' import classnames from 'classnames' import withTouch from './with_touch' /** @lends ApTouchable */ const ApTouchable = React.createClass({ // -------------------- // Specs // -------------------- propTypes: {}, statics: {}, getInitialState () { return {} }, getDefaultProps () { return {} }, render () { const s = this let { props } = s return ( <div id={ props.id } className={ classnames('ap-touchable', props.className) } style={ Object.assign({}, props.style) }> { props.children } </div> ) } // -------------------- // Lifecycle // -------------------- // ------------------ // Helper // ------------------ // ------------------ // Private // ------------------ }) export { ApTouchable } export default withTouch(ApTouchable)