UNPKG

1.19 kBTypeScriptView Raw
1import * as React from 'react';
2import { SxProps } from '@mui/system';
3import { InternalStandardProps as StandardProps, Theme } from '..';
4import { FormGroupClasses } from './formGroupClasses';
5
6export interface FormGroupProps extends StandardProps<React.HTMLAttributes<HTMLDivElement>> {
7 /**
8 * The content of the component.
9 */
10 children?: React.ReactNode;
11 /**
12 * Override or extend the styles applied to the component.
13 */
14 classes?: Partial<FormGroupClasses>;
15 /**
16 * Display group of elements in a compact row.
17 * @default false
18 */
19 row?: boolean;
20 /**
21 * The system prop that allows defining system overrides as well as additional CSS styles.
22 */
23 sx?: SxProps<Theme>;
24}
25
26/**
27 * `FormGroup` wraps controls such as `Checkbox` and `Switch`.
28 * It provides compact row layout.
29 * For the `Radio`, you should be using the `RadioGroup` component instead of this one.
30 *
31 * Demos:
32 *
33 * - [Checkbox](https://mui.com/material-ui/react-checkbox/)
34 * - [Switch](https://mui.com/material-ui/react-switch/)
35 *
36 * API:
37 *
38 * - [FormGroup API](https://mui.com/material-ui/api/form-group/)
39 */
40export default function FormGroup(props: FormGroupProps): React.JSX.Element;