UNPKG

1.89 kBTypeScriptView Raw
1import * as React from 'react';
2import { SxProps } from '@mui/system';
3import { Theme } from '../styles';
4import { OverridableComponent, OverrideProps } from '../OverridableComponent';
5import { ScopedCssBaselineClasses } from './scopedCssBaselineClasses';
6
7export interface ScopedCssBaselineOwnProps {
8 /**
9 * The content of the component.
10 */
11 children?: React.ReactNode;
12 /**
13 * Override or extend the styles applied to the component.
14 */
15 classes?: Partial<ScopedCssBaselineClasses>;
16 /**
17 * Enable `color-scheme` CSS property to use `theme.palette.mode`.
18 * For more details, check out https://developer.mozilla.org/en-US/docs/Web/CSS/color-scheme
19 * For browser support, check out https://caniuse.com/?search=color-scheme
20 */
21 enableColorScheme?: boolean;
22 /**
23 * The system prop that allows defining system overrides as well as additional CSS styles.
24 */
25 sx?: SxProps<Theme>;
26}
27
28export interface ScopedCssBaselineTypeMap<
29 AdditionalProps = {},
30 RootComponent extends React.ElementType = 'div',
31> {
32 props: AdditionalProps & ScopedCssBaselineOwnProps;
33 defaultComponent: RootComponent;
34}
35/**
36 *
37 * Demos:
38 *
39 * - [CSS Baseline](https://mui.com/material-ui/react-css-baseline/)
40 *
41 * API:
42 *
43 * - [ScopedCssBaseline API](https://mui.com/material-ui/api/scoped-css-baseline/)
44 */
45declare const ScopedCssBaseline: OverridableComponent<ScopedCssBaselineTypeMap>;
46
47export type ScopedCssBaselineProps<
48 RootComponent extends React.ElementType = ScopedCssBaselineTypeMap['defaultComponent'],
49 AdditionalProps = {},
50> = OverrideProps<ScopedCssBaselineTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
51 component?: React.ElementType;
52};
53
54/**
55 *
56 * Demos:
57 *
58 * - [Css Baseline](https://mui.com/components/css-baseline/)
59 *
60 * API:
61 *
62 * - [ScopedCssBaseline API](https://mui.com/api/scoped-css-baseline/)
63 */
64export default ScopedCssBaseline;