1 | import * as React from 'react';
|
2 | import { SxProps } from '@mui/system';
|
3 | import { OverridableStringUnion } from '@mui/types';
|
4 | import { Theme } from '..';
|
5 | import { OverridableComponent, OverrideProps } from '../OverridableComponent';
|
6 | import { TableClasses } from './tableClasses';
|
7 |
|
8 | export interface TablePropsSizeOverrides {}
|
9 |
|
10 | export interface TableOwnProps {
|
11 | |
12 |
|
13 |
|
14 | children?: React.ReactNode;
|
15 | |
16 |
|
17 |
|
18 | classes?: Partial<TableClasses>;
|
19 | |
20 |
|
21 |
|
22 |
|
23 | padding?: 'normal' | 'checkbox' | 'none';
|
24 | |
25 |
|
26 |
|
27 |
|
28 | size?: OverridableStringUnion<'small' | 'medium', TablePropsSizeOverrides>;
|
29 | |
30 |
|
31 |
|
32 |
|
33 | stickyHeader?: boolean;
|
34 | |
35 |
|
36 |
|
37 | sx?: SxProps<Theme>;
|
38 | }
|
39 |
|
40 | export interface TableTypeMap<
|
41 | AdditionalProps = {},
|
42 | RootComponent extends React.ElementType = 'table',
|
43 | > {
|
44 | props: AdditionalProps & TableOwnProps;
|
45 | defaultComponent: RootComponent;
|
46 | }
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 | declare const Table: OverridableComponent<TableTypeMap>;
|
58 |
|
59 | export type TableProps<
|
60 | RootComponent extends React.ElementType = TableTypeMap['defaultComponent'],
|
61 | AdditionalProps = {},
|
62 | > = OverrideProps<TableTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
|
63 | component?: React.ElementType;
|
64 | };
|
65 |
|
66 | export default Table;
|