1
0
REI-Fixed/app/assets/javascripts/components/components/character_counter.jsx
2016-08-31 16:15:12 +02:00

22 lines
389 B
JavaScript

import PureRenderMixin from 'react-addons-pure-render-mixin';
const CharacterCounter = React.createClass({
propTypes: {
text: React.PropTypes.string.isRequired
},
mixins: [PureRenderMixin],
render () {
return (
<span style={{ fontSize: '16px', cursor: 'default' }}>
{this.props.text.length}
</span>
);
}
});
export default CharacterCounter;