diff --git a/docs/pages/api-docs/global-styles.js b/docs/pages/api-docs/global-styles.js
new file mode 100644
index 00000000000000..6bdec72a6ca6ca
--- /dev/null
+++ b/docs/pages/api-docs/global-styles.js
@@ -0,0 +1,23 @@
+import * as React from 'react';
+import ApiPage from 'docs/src/modules/components/ApiPage';
+import mapApiPageTranslations from 'docs/src/modules/utils/mapApiPageTranslations';
+import jsonPageContent from './global-styles.json';
+
+export default function Page(props) {
+ const { descriptions, pageContent } = props;
+ return
| number
| object
| { __emotion_styles: any }
| string
| bool"
+ }
+ }
+ },
+ "name": "GlobalStyles",
+ "styles": { "classes": [], "globalClasses": {}, "name": null },
+ "spread": true,
+ "filename": "/packages/material-ui/src/GlobalStyles/GlobalStyles.js",
+ "inheritance": null,
+ "demos": "
You can easily customize the appearance of a Material-UI component.
diff --git a/docs/src/pagesApi.js b/docs/src/pagesApi.js index be3808f4f45bb5..b5857b34f4f1ad 100644 --- a/docs/src/pagesApi.js +++ b/docs/src/pagesApi.js @@ -57,6 +57,7 @@ module.exports = [ { pathname: '/api-docs/form-group' }, { pathname: '/api-docs/form-helper-text' }, { pathname: '/api-docs/form-label' }, + { pathname: '/api-docs/global-styles' }, { pathname: '/api-docs/grid' }, { pathname: '/api-docs/grow' }, { pathname: '/api-docs/hidden' }, diff --git a/docs/translations/api-docs/global-styles/global-styles-de.json b/docs/translations/api-docs/global-styles/global-styles-de.json new file mode 100644 index 00000000000000..c53a9a9eef06f3 --- /dev/null +++ b/docs/translations/api-docs/global-styles/global-styles-de.json @@ -0,0 +1,5 @@ +{ + "componentDescription": "", + "propDescriptions": { "styles": "The styles you want to apply globally." }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/global-styles/global-styles-es.json b/docs/translations/api-docs/global-styles/global-styles-es.json new file mode 100644 index 00000000000000..c53a9a9eef06f3 --- /dev/null +++ b/docs/translations/api-docs/global-styles/global-styles-es.json @@ -0,0 +1,5 @@ +{ + "componentDescription": "", + "propDescriptions": { "styles": "The styles you want to apply globally." }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/global-styles/global-styles-fr.json b/docs/translations/api-docs/global-styles/global-styles-fr.json new file mode 100644 index 00000000000000..c53a9a9eef06f3 --- /dev/null +++ b/docs/translations/api-docs/global-styles/global-styles-fr.json @@ -0,0 +1,5 @@ +{ + "componentDescription": "", + "propDescriptions": { "styles": "The styles you want to apply globally." }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/global-styles/global-styles-ja.json b/docs/translations/api-docs/global-styles/global-styles-ja.json new file mode 100644 index 00000000000000..c53a9a9eef06f3 --- /dev/null +++ b/docs/translations/api-docs/global-styles/global-styles-ja.json @@ -0,0 +1,5 @@ +{ + "componentDescription": "", + "propDescriptions": { "styles": "The styles you want to apply globally." }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/global-styles/global-styles-pt.json b/docs/translations/api-docs/global-styles/global-styles-pt.json new file mode 100644 index 00000000000000..c53a9a9eef06f3 --- /dev/null +++ b/docs/translations/api-docs/global-styles/global-styles-pt.json @@ -0,0 +1,5 @@ +{ + "componentDescription": "", + "propDescriptions": { "styles": "The styles you want to apply globally." }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/global-styles/global-styles-ru.json b/docs/translations/api-docs/global-styles/global-styles-ru.json new file mode 100644 index 00000000000000..c53a9a9eef06f3 --- /dev/null +++ b/docs/translations/api-docs/global-styles/global-styles-ru.json @@ -0,0 +1,5 @@ +{ + "componentDescription": "", + "propDescriptions": { "styles": "The styles you want to apply globally." }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/global-styles/global-styles-zh.json b/docs/translations/api-docs/global-styles/global-styles-zh.json new file mode 100644 index 00000000000000..c53a9a9eef06f3 --- /dev/null +++ b/docs/translations/api-docs/global-styles/global-styles-zh.json @@ -0,0 +1,5 @@ +{ + "componentDescription": "", + "propDescriptions": { "styles": "The styles you want to apply globally." }, + "classDescriptions": {} +} diff --git a/docs/translations/api-docs/global-styles/global-styles.json b/docs/translations/api-docs/global-styles/global-styles.json new file mode 100644 index 00000000000000..c53a9a9eef06f3 --- /dev/null +++ b/docs/translations/api-docs/global-styles/global-styles.json @@ -0,0 +1,5 @@ +{ + "componentDescription": "", + "propDescriptions": { "styles": "The styles you want to apply globally." }, + "classDescriptions": {} +} diff --git a/packages/material-ui/src/GlobalStyles/GlobalStyles.d.ts b/packages/material-ui/src/GlobalStyles/GlobalStyles.d.ts index d8a286e869f595..eaf72bed48af70 100644 --- a/packages/material-ui/src/GlobalStyles/GlobalStyles.d.ts +++ b/packages/material-ui/src/GlobalStyles/GlobalStyles.d.ts @@ -1,11 +1,20 @@ -import { GlobalStylesProps } from '@material-ui/styled-engine'; -import { DistributiveOmit } from '@material-ui/types'; +import { GlobalStylesProps as StyledGlobalStylesProps } from '@material-ui/styled-engine'; + +export interface GlobalStylesProps { + /** + * The styles you want to apply globally. + */ + styles: StyledGlobalStylesProps['styles']; +} + /** + * + * Demos: + * + * - [How To Customize](https://material-ui.com/customization/how-to-customize/) * * API: * - * - [Global API](https://material-ui.com/api/global/) + * - [GlobalStyles API](https://material-ui.com/api/global-styles/) */ -export default function GlobalStyles( - props: DistributiveOmit