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/ui-presets / src / presets / Switch / typings.ts
Size: Mime:
import { ReactNode } from 'react'
import { CommonState } from '@skava/ui/dist/state'

export interface SwitchRenderProp extends Function {
  (props: SwitchProps): ReactNode
}

export interface SwitchHandlerProps {
  isSelected?: boolean
  label?: string
  state?: CommonState
}

export interface SwitchHandleToggleChange extends Function {
  (args: SwitchHandlerProps): void
}

export interface SwitchProps extends SwitchHandlerProps {
  className?: string
  children?: ReactNode
  // renderProps
  renderWrapper?: SwitchRenderProp
  // handler
  onToggle: SwitchHandleToggleChange
}