mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-11-23 15:24:53 +00:00
22 lines
389 B
JavaScript
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;
|