Sha256: 980a1b8c8dc3c8a0b75a445af3718658b2e2f7ea3261dc642f66142c9d86a537
Contents?: true
Size: 670 Bytes
Versions: 12
Compression:
Stored size: 670 Bytes
Contents
Rev.registerComponent('Form', class Form extends React.Component { static get defaultProps() { return { method: 'GET', } } get className() { return this.classAdd({ 'RevForm': true, }) } get method() { return this.props.method.toUpperCase() } get supportedMethod() { return this.method === 'GET' ? 'GET' : 'POST' } render() { let {AuthenticityToken, MethodOverride} = Rev.Components return <form {...this.props} className={this.className} method={this.supportedMethod}> <AuthenticityToken /> <MethodOverride method={this.method} /> {this.props.children} </form> } })
Version data entries
12 entries across 12 versions & 1 rubygems