UNPKG

@withjoy/joykit

Version:

UI Component Library for Joy web

40 lines (39 loc) 1.24 kB
import React from 'react'; import { InputProps } from '../Input'; import { LabelledProps } from '../../common/props'; import { BaseFormFieldProps } from '../FormField'; export interface ControlGroupProps extends BaseFormFieldProps, LabelledProps { } declare type ControlGroupState = Readonly<{ focused: boolean; }>; /** * The `<ControlGroup />` component is a lightweight wrapper intended to group * several form controls. * * If you're looking to group a *single* control, refer to the `<FormField />` component. * * @example * * ``` * <ControlGroup> * <ControlGroup.Input {...props}/> * <ControlGroup.Input {...props}/> * </ControlGroup> * ``` * */ export declare class ControlGroup extends React.PureComponent<ControlGroupProps, ControlGroupState> { static displayName: string; static getDerivedStateFromProps(props: ControlGroupProps, state: ControlGroupState): { focused: boolean; } | null; static Input: React.FC<InputProps & Pick<LabelledProps, 'label'>>; readonly state: { focused: boolean; }; handleOnFocus: React.FocusEventHandler; handleOnBlur: React.FocusEventHandler; render(): React.ReactNode; } export {};