apeman-react-touchable
Version:
apeman react package for touchable component.
59 lines (44 loc) • 993 B
JSX
/**
* apeman react package for touchable component.
* @class ApTouchable
*/
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)