Sha256: 5dee3ca899f9cfdd4d392faafd64b34171f90b2eed62deb29613af1c9c4fbc36
Contents?: true
Size: 501 Bytes
Versions: 12
Compression:
Stored size: 501 Bytes
Contents
Rev.registerComponent('Pluralize', class Pluralize extends React.Component { static get propTypes() { return { count: React.PropTypes.number.isRequired, one: React.PropTypes.string.isRequired, more: React.PropTypes.string, } } get text() { if(this.props.count === 1) { return `${this.props.count} ${this.props.one}` } return `${this.props.count} ${this.props.more || this.props.one+'s'}` } render() { return <span>{this.text}</span> } })
Version data entries
12 entries across 12 versions & 1 rubygems