Sha256: 2b07f90a4e956c8ebdc60c4117891eeaba7099167ba81a74b768b17d2f87f5c3
Contents?: true
Size: 808 Bytes
Versions: 12
Compression:
Stored size: 808 Bytes
Contents
Rev.registerComponent('Button', class Button 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
12 entries across 12 versions & 1 rubygems