UNPKG

1.65 kBTypeScriptView Raw
1import * as React from 'react';
2import { SxProps } from '@mui/system';
3import { ExtendButtonBase, ExtendButtonBaseTypeMap } from '../ButtonBase';
4import { OverrideProps } from '../OverridableComponent';
5import { Theme } from '..';
6import { AccordionSummaryClasses } from './accordionSummaryClasses';
7
8export interface AccordionSummaryOwnProps {
9 /**
10 * The content of the component.
11 */
12 children?: React.ReactNode;
13 /**
14 * Override or extend the styles applied to the component.
15 */
16 classes?: Partial<AccordionSummaryClasses>;
17 /**
18 * The icon to display as the expand indicator.
19 */
20 expandIcon?: React.ReactNode;
21 /**
22 * The system prop that allows defining system overrides as well as additional CSS styles.
23 */
24 sx?: SxProps<Theme>;
25}
26
27export type AccordionSummaryTypeMap<
28 AdditionalProps = {},
29 RootComponent extends React.ElementType = 'div',
30> = ExtendButtonBaseTypeMap<{
31 props: AdditionalProps & AccordionSummaryOwnProps;
32 defaultComponent: RootComponent;
33}>;
34
35/**
36 *
37 * Demos:
38 *
39 * - [Accordion](https://mui.com/material-ui/react-accordion/)
40 *
41 * API:
42 *
43 * - [AccordionSummary API](https://mui.com/material-ui/api/accordion-summary/)
44 * - inherits [ButtonBase API](https://mui.com/material-ui/api/button-base/)
45 */
46declare const AccordionSummary: ExtendButtonBase<AccordionSummaryTypeMap>;
47
48export type AccordionSummaryProps<
49 RootComponent extends React.ElementType = AccordionSummaryTypeMap['defaultComponent'],
50 AdditionalProps = {},
51> = OverrideProps<AccordionSummaryTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
52 component?: React.ElementType;
53};
54
55export default AccordionSummary;