UNPKG

simplr-forms-dom

Version:
37 lines (36 loc) 1.76 kB
/// <reference types="react" /> import * as React from "react"; import * as PropTypes from "prop-types"; import { BaseContainer, BaseContainerParentContext } from "simplr-forms"; import { FormStoreStateRecord, FieldStoreState } from "simplr-forms/contracts"; import { RadioGroupChildContext, RadioValue } from "./radio-group"; import { HTMLElementProps, DomFieldTemplateCallback } from "../contracts/field"; export interface RadioProps extends HTMLElementProps<HTMLInputElement> { value: string; template?: DomFieldTemplateCallback; ref?: React.Ref<Radio>; } export interface RadioState { FormStoreState?: FormStoreStateRecord; Value?: RadioValue; } export declare type RadioParentContext = RadioGroupChildContext & BaseContainerParentContext; export declare class Radio extends BaseContainer<RadioProps, RadioState> { Element: HTMLInputElement | undefined; state: RadioState; context: RadioParentContext; static contextTypes: PropTypes.ValidationMap<RadioParentContext>; componentWillMount(): void; protected OnChangeHandler: React.ChangeEventHandler<HTMLInputElement>; protected OnFocus: React.FocusEventHandler<HTMLInputElement>; protected OnBlur: React.FocusEventHandler<HTMLInputElement>; protected readonly FieldState: FieldStoreState; protected readonly FieldsGroupId: string | undefined; protected readonly Disabled: boolean | undefined; protected readonly FieldTemplate: DomFieldTemplateCallback | undefined; protected OnStoreUpdated(): void; protected GetHTMLProps(props: RadioProps): {}; protected SetElementRef: (element: HTMLInputElement | undefined) => void; renderField(): JSX.Element | null; render(): JSX.Element | null; }