Blame view

天文台pc/tianwentai-ui/node_modules/@mui/material/ListItem/ListItem.d.ts 4.39 KB
bc518174   王天杨   提交两个项目文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
  import * as React from 'react';
  import { SxProps } from '@mui/system';
  import { Theme } from "../styles/index.js";
  import { OverridableComponent, OverrideProps } from "../OverridableComponent/index.js";
  import { ListItemClasses } from "./listItemClasses.js";
  export interface ListItemComponentsPropsOverrides {}
  
  /**
   * This type is kept for compatibility. Use `ListItemOwnProps` instead.
   */
  export interface ListItemBaseProps {
    /**
     * Defines the `align-items` style property.
     * @default 'center'
     */
    alignItems?: 'flex-start' | 'center';
    /**
     * The content of the component if a `ListItemSecondaryAction` is used it must
     * be the last child.
     */
    children?: React.ReactNode;
    /**
     * Override or extend the styles applied to the component.
     */
    classes?: Partial<ListItemClasses>;
    /**
     * The container component used when a `ListItemSecondaryAction` is the last child.
     * @default 'li'
     * @deprecated Use the `component` or `slots.root` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
     */
    ContainerComponent?: React.ElementType<React.HTMLAttributes<HTMLDivElement>>;
    /**
     * Props applied to the container component if used.
     * @default {}
     * @deprecated Use the `slotProps.root` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
     */
    ContainerProps?: React.HTMLAttributes<HTMLDivElement>;
    /**
     * If `true`, compact vertical padding designed for keyboard and mouse input is used.
     * The prop defaults to the value inherited from the parent List component.
     * @default false
     */
    dense?: boolean;
    /**
     * If `true`, the left and right padding is removed.
     * @default false
     */
    disableGutters?: boolean;
    /**
     * If `true`, all padding is removed.
     * @default false
     */
    disablePadding?: boolean;
    /**
     * If `true`, a 1px light border is added to the bottom of the list item.
     * @default false
     */
    divider?: boolean;
    /**
     * The element to display at the end of ListItem.
     */
    secondaryAction?: React.ReactNode;
    /**
     * The system prop that allows defining system overrides as well as additional CSS styles.
     */
    sx?: SxProps<Theme>;
  }
  export interface ListItemOwnProps extends ListItemBaseProps {
    /**
     * The components used for each slot inside.
     *
     * @deprecated Use the `slots` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
     * @default {}
     */
    components?: {
      Root?: React.ElementType;
    };
    /**
     * The extra props for the slot components.
     * You can override the existing props or add new ones.
     *
     * @deprecated Use the `slotProps` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
     * @default {}
     */
    componentsProps?: {
      root?: React.HTMLAttributes<HTMLDivElement> & ListItemComponentsPropsOverrides;
    };
    /**
     * The extra props for the slot components.
     * You can override the existing props or add new ones.
     *
     * @default {}
     */
    slotProps?: {
      root?: React.HTMLAttributes<HTMLDivElement> & ListItemComponentsPropsOverrides;
    };
    /**
     * The components used for each slot inside.
     *
     * @default {}
     */
    slots?: {
      root?: React.ElementType;
    };
  }
  export interface ListItemTypeMap<AdditionalProps, RootComponent extends React.ElementType> {
    props: AdditionalProps & ListItemOwnProps;
    defaultComponent: RootComponent;
  }
  
  /**
   * Uses an additional container component if `ListItemSecondaryAction` is the last child.
   *
   * Demos:
   *
   * - [Lists](https://mui.com/material-ui/react-list/)
   * - [Transfer List](https://mui.com/material-ui/react-transfer-list/)
   *
   * API:
   *
   * - [ListItem API](https://mui.com/material-ui/api/list-item/)
   */
  declare const ListItem: OverridableComponent<ListItemTypeMap<{}, 'li'>>;
  export type ListItemProps<RootComponent extends React.ElementType = 'li', AdditionalProps = {}> = OverrideProps<ListItemTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
    component?: React.ElementType;
  };
  export default ListItem;