2017-07-11 18:17:00 +00:00
|
|
|
import React from 'react'
|
|
|
|
import PropTypes from 'prop-types'
|
|
|
|
import { compose, setDisplayName, pure, setPropTypes } from 'recompose'
|
|
|
|
|
2018-12-17 16:34:32 +00:00
|
|
|
const AddCount = ({ count, addCount }) => (
|
2017-07-11 18:17:00 +00:00
|
|
|
<div>
|
|
|
|
<style jsx>{`
|
|
|
|
div {
|
|
|
|
padding: 0 0 20px 0;
|
|
|
|
}
|
2018-12-17 16:34:32 +00:00
|
|
|
`}</style>
|
|
|
|
<h1>
|
|
|
|
AddCount: <span>{count}</span>
|
|
|
|
</h1>
|
2017-07-11 18:17:00 +00:00
|
|
|
<button onClick={addCount}>Add To Count</button>
|
|
|
|
</div>
|
2018-12-17 16:34:32 +00:00
|
|
|
)
|
2017-07-11 18:17:00 +00:00
|
|
|
|
|
|
|
export default compose(
|
|
|
|
setDisplayName('AddCount'),
|
|
|
|
setPropTypes({
|
|
|
|
count: PropTypes.number,
|
|
|
|
addCount: PropTypes.func
|
|
|
|
}),
|
|
|
|
pure
|
|
|
|
)(AddCount)
|