UNPKG

1.36 kBTypeScriptView Raw
1import { OverridableComponent, OverrideProps } from '../OverridableComponent';
2
3export interface DividerTypeMap<P = {}, D extends React.ElementType = 'hr'> {
4 props: P & {
5 /**
6 * Absolutely position the element.
7 */
8 absolute?: boolean;
9 /**
10 * If `true`, a vertical divider will have the correct height when used in flex container.
11 * (By default, a vertical divider will have a calculated height of `0px` if it is the child of a flex container.)
12 */
13 flexItem?: boolean;
14 /**
15 * If `true`, the divider will have a lighter color.
16 */
17 light?: boolean;
18 /**
19 * The divider orientation.
20 */
21 orientation?: 'horizontal' | 'vertical';
22 /**
23 * The variant to use.
24 */
25 variant?: 'fullWidth' | 'inset' | 'middle';
26 };
27 defaultComponent: D;
28 classKey: DividerClassKey;
29}
30
31/**
32 *
33 * Demos:
34 *
35 * - [Dividers](https://mui.com/components/dividers/)
36 * - [Lists](https://mui.com/components/lists/)
37 *
38 * API:
39 *
40 * - [Divider API](https://mui.com/api/divider/)
41 */
42declare const Divider: OverridableComponent<DividerTypeMap>;
43
44export type DividerClassKey = 'root' | 'absolute' | 'inset' | 'light' | 'middle' | 'vertical';
45
46export type DividerProps<
47 D extends React.ElementType = DividerTypeMap['defaultComponent'],
48 P = {}
49> = OverrideProps<DividerTypeMap<P, D>, D>;
50
51export default Divider;