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    
Size: Mime:
import { IValueDidChange } from 'xmobx/mobx'
import {
  InputStateType,
  FormStateType,
  ObserverFormType,
  ObserverInputType,
} from 'src/forms'
import { InputValue } from 'src/forms'

type RadioOptions = InputStateType[] | Array<Object>
type Changed = IValueDidChange<InputValue>

interface RadioGroupState extends FormStateType {
  // static named(name: string): RadioGroupState
  updateFrom(list: RadioOptions): RadioGroupState
  onInputChange(input: InputStateType): never
  handleInputChange(input: InputStateType, observableChange?: Changed): never
  // mutates
  init(): void
}

type RadioOnChangeHandler = React.ChangeEventHandler<
  React.InputHTMLAttributes<InputStateType>
>

interface RadioGroupComponent {
  name: string
  label: string

  identifier: string
  children: React.Component
  isSelected: boolean
  onChange: RadioOnChangeHandler
  index: number

  state: InputStateType
}

export { RadioGroupState, RadioGroupComponent, RadioOnChangeHandler }