Sha256: a21a2998c03123b5647c09b15c10ba3d18670038e2037a1befec81595c315bce
Contents?: true
Size: 801 Bytes
Versions: 6
Compression:
Stored size: 801 Bytes
Contents
Rev.registerComponent('Button', class extends React.Component { static get propsForClassNames() { return this._propsForClassNames = this._propsForClassNames || [ 'tiny', 'small', 'medium', 'large', 'alert', 'disabled', 'secondary', 'success', 'expand', ] } get className() { let classNamesObject = {RevButton: true} this.constructor.propsForClassNames.forEach((propName) => { classNamesObject[propName] = this.props[propName] || false }) return this.classAdd(classNamesObject) } get passThroughProps() { return this.getPropsWithout(this._propsForClassNames) } render() { return <button {...this.passThroughProps} className={this.className}> {this.props.children} </button> } })
Version data entries
6 entries across 6 versions & 1 rubygems