UNPKG

1.58 kBTypeScriptView Raw
1import * as React from 'react';
2import { SxProps } from '@mui/system';
3import { OverridableComponent, OverrideProps } from '../OverridableComponent';
4import { Theme } from '../styles';
5import { TypographyTypeMap } from '../Typography';
6import { DialogTitleClasses } from './dialogTitleClasses';
7
8export interface DialogTitleOwnProps extends Omit<TypographyTypeMap['props'], 'classes'> {
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<DialogTitleClasses>;
17 /**
18 * The system prop that allows defining system overrides as well as additional CSS styles.
19 */
20 sx?: SxProps<Theme>;
21}
22
23export interface DialogTitleTypeMap<
24 AdditionalProps = {},
25 RootComponent extends React.ElementType = TypographyTypeMap['defaultComponent'],
26> {
27 props: AdditionalProps & DialogTitleOwnProps;
28 defaultComponent: RootComponent;
29}
30
31/**
32 *
33 * Demos:
34 *
35 * - [Dialog](https://mui.com/material-ui/react-dialog/)
36 *
37 * API:
38 *
39 * - [DialogTitle API](https://mui.com/material-ui/api/dialog-title/)
40 * - inherits [Typography API](https://mui.com/material-ui/api/typography/)
41 */
42declare const DialogTitle: OverridableComponent<DialogTitleTypeMap>;
43
44export type DialogTitleProps<
45 RootComponent extends React.ElementType = DialogTitleTypeMap['defaultComponent'],
46 AdditionalProps = { component?: React.ElementType },
47> = OverrideProps<DialogTitleTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
48 component?: React.ElementType;
49};
50
51export default DialogTitle;