UNPKG

1.64 kBTypeScriptView Raw
1import * as React from 'react';
2import { ExtendButtonBase, ExtendButtonBaseTypeMap } from '../ButtonBase';
3import { IconButtonProps } from '../IconButton';
4import { OverrideProps } from '../OverridableComponent';
5
6export type ExpansionPanelSummaryTypeMap<
7 P = {},
8 D extends React.ElementType = 'div'
9> = ExtendButtonBaseTypeMap<{
10 props: P & {
11 /**
12 * The content of the expansion panel summary.
13 */
14 children?: React.ReactNode;
15 /**
16 * The icon to display as the expand indicator.
17 */
18 expandIcon?: React.ReactNode;
19 /**
20 * Props applied to the `IconButton` element wrapping the expand icon.
21 */
22 IconButtonProps?: Partial<IconButtonProps>;
23 };
24 defaultComponent: D;
25 classKey: ExpansionPanelSummaryClassKey;
26}>;
27
28/**
29 * ⚠️ The ExpansionPanelSummary component was renamed to AccordionSummary to use a more common naming convention.
30 *
31 * You should use `import { AccordionSummary } from '@material-ui/core'`
32 * or `import AccordionSummary from '@material-ui/core/AccordionSummary'`.
33 * API:
34 *
35 * - [ExpansionPanelSummary API](https://mui.com/api/expansion-panel-summary/)
36 * - inherits [ButtonBase API](https://mui.com/api/button-base/)
37 */
38declare const ExpansionPanelSummary: ExtendButtonBase<ExpansionPanelSummaryTypeMap>;
39
40export type ExpansionPanelSummaryClassKey =
41 | 'root'
42 | 'expanded'
43 | 'focused'
44 | 'disabled'
45 | 'content'
46 | 'expandIcon';
47
48export type ExpansionPanelSummaryProps<
49 D extends React.ElementType = ExpansionPanelSummaryTypeMap['defaultComponent'],
50 P = {}
51> = OverrideProps<ExpansionPanelSummaryTypeMap<P, D>, D>;
52
53export default ExpansionPanelSummary;