Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/forms / src / new-forms / forms / renderProps.tsx
Size: Mime:
import * as React from 'react'
import { FormRenderProps } from './typings'
import { StyledForm, StyledSubmitButton } from './styled'

export const defaultRenderForm = (props: FormRenderProps) => (
  <StyledForm
    className={props.className}
    id={props.id}
    aria-invalid={props.state.isValid === false}
    onSubmit={props.onSubmit}
  >
    {props.children}
  </StyledForm>
)
export const defaultRenderButtonGroup = (props: FormRenderProps) => (
  // onClick={props.onSubmit} < is not submit
  <StyledSubmitButton onClick={props.onSubmit as any}>
    Continue
  </StyledSubmitButton>
)