@gechiui/components
Version:
UI components for GeChiUI.
34 lines (27 loc) • 822 B
text/typescript
/**
* External dependencies
*/
// eslint-disable-next-line no-restricted-imports
import type { CSSProperties, ReactNode, ReactText } from 'react';
/**
* Internal dependencies
*/
import type { Props as ControlLabelProps } from '../control-label/types';
import type { Props as GridProps } from '../../grid/types';
export type FormGroupLabelProps = ControlLabelProps & {
labelHidden?: boolean;
id?: ReactText;
};
export type FormGroupContentProps = FormGroupLabelProps & {
alignLabel?: CSSProperties[ 'textAlign' ];
help?: ReactNode;
horizontal?: boolean;
label?: ReactNode;
spacing?: CSSProperties[ 'width' ];
truncate?: boolean;
};
type Horizontal = GridProps & {
horizontal: true;
};
type Vertical = { horizontal: false };
export type FormGroupProps = FormGroupContentProps & ( Horizontal | Vertical );