UNPKG

1.89 kBTypeScriptView Raw
1import * as React from 'react';
2import { SxProps } from '@mui/system';
3import { Theme } from '..';
4import { OverridableComponent, OverrideProps } from '../OverridableComponent';
5import { ListSubheaderClasses } from './listSubheaderClasses';
6
7export interface ListSubheaderOwnProps {
8 /**
9 * The content of the component.
10 */
11 children?: React.ReactNode;
12 /**
13 * Override or extend the styles applied to the component.
14 */
15 classes?: Partial<ListSubheaderClasses>;
16 /**
17 * The color of the component. It supports those theme colors that make sense for this component.
18 * @default 'default'
19 */
20 color?: 'default' | 'primary' | 'inherit';
21 /**
22 * If `true`, the List Subheader will not have gutters.
23 * @default false
24 */
25 disableGutters?: boolean;
26 /**
27 * If `true`, the List Subheader will not stick to the top during scroll.
28 * @default false
29 */
30 disableSticky?: boolean;
31 /**
32 * If `true`, the List Subheader is indented.
33 * @default false
34 */
35 inset?: boolean;
36 /**
37 * The system prop that allows defining system overrides as well as additional CSS styles.
38 */
39 sx?: SxProps<Theme>;
40}
41
42export interface ListSubheaderTypeMap<
43 AdditionalProps = {},
44 RootComponent extends React.ElementType = 'li',
45> {
46 props: AdditionalProps & ListSubheaderOwnProps;
47 defaultComponent: RootComponent;
48}
49
50/**
51 *
52 * Demos:
53 *
54 * - [Lists](https://mui.com/material-ui/react-list/)
55 *
56 * API:
57 *
58 * - [ListSubheader API](https://mui.com/material-ui/api/list-subheader/)
59 */
60declare const ListSubheader: OverridableComponent<ListSubheaderTypeMap>;
61
62export type ListSubheaderProps<
63 RootComponent extends React.ElementType = ListSubheaderTypeMap['defaultComponent'],
64 AdditionalProps = {},
65> = OverrideProps<ListSubheaderTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
66 component?: React.ElementType;
67};
68
69export default ListSubheader;