UNPKG

@clayui/form

Version:
81 lines (80 loc) 2.8 kB
/** * SPDX-FileCopyrightText: © 2019 Liferay, Inc. <https://liferay.com> * SPDX-License-Identifier: BSD-3-Clause */ import React from 'react'; interface IGroupItemProps extends React.HTMLAttributes<HTMLDivElement> { /** * Flag to indicate if `input-group-append` class should * be applied */ append?: boolean; /** * Flag to indicate if `input-group-prepend` class should * be applied */ prepend?: boolean; /** * Flag to indicate if `input-group-item-shrink` class should * be applied */ shrink?: boolean; } export declare const GroupItem: React.ForwardRefExoticComponent<IGroupItemProps & React.RefAttributes<HTMLDivElement>>; interface IGroupProps extends React.HTMLAttributes<HTMLDivElement> { /** * Flag to indicate if `input-group-sm` class should * be applied */ small?: boolean; /** * Flag to indicate if `input-group-stacked-sm-down` class * should be applied. */ stacked?: boolean; } export declare const Group: React.ForwardRefExoticComponent<IGroupProps & React.RefAttributes<HTMLDivElement>>; export declare const GroupText: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>; interface IGroupInsetProps extends React.HTMLAttributes<HTMLDivElement | HTMLSpanElement | HTMLLabelElement> { /** * Flag to indicate if `input-group-inset-item-after` class * should be applied. */ after?: boolean; /** * Flag to indicate if `input-group-inset-item-before` class * should be applied. */ before?: boolean; /** * Name of container element */ tag?: 'div' | 'span' | 'label'; } declare const GroupInsetItem: React.ForwardRefExoticComponent<IGroupInsetProps & React.RefAttributes<HTMLDivElement | HTMLLabelElement | HTMLSpanElement>>; interface IProps extends React.InputHTMLAttributes<HTMLInputElement> { /** * Input component to render. Can either be a string like 'input' or 'textarea' or a component. */ component?: 'input' | 'textarea' | React.ForwardRefExoticComponent<any>; /** * Flag to indicate if `input-group-inset-after` class should be applied */ insetAfter?: boolean; /** * Flag to indicate if `input-group-inset-before` class should be applied */ insetBefore?: boolean; /** * Selects the height of the input. */ sizing?: 'lg' | 'regular' | 'sm'; } interface IForwardRef<T, P = {}> extends React.ForwardRefExoticComponent<P & React.RefAttributes<T>> { Group: typeof Group; GroupInsetItem: typeof GroupInsetItem; GroupItem: typeof GroupItem; GroupText: typeof GroupText; } export declare const Input: IForwardRef<HTMLInputElement, IProps>; export default Input;