Skip to content

Commit

Permalink
[docs] Link to "Customization of Theme" from relevant theme interfaces (
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon authored Aug 12, 2021
1 parent ed5e56e commit 86894af
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docs/src/pages/guides/typescript/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ The strict mode options are the same that are required for every types package
published in the `@types/` namespace. Using a less strict `tsconfig.json` or omitting some of the libraries might cause errors. To get the best type experience with the types we recommend
setting `"strict": true`.

## Customization of `Theme`

Moved to [/customization/theming/#custom-variables](/customization/theming/#custom-variables).

## Usage of `component` prop

Many Material-UI components allow you to replace their root node via a `component`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/**
* The default theme interface, augment this to avoid having to set the theme type everywhere
* The default theme interface, augment this to avoid having to set the theme type everywhere.
* Our [TypeScript guide on theme customization](https://material-ui.com/guides/typescript/#customization-of-theme) explains in detail how you would add custom properties.
*/
export interface DefaultTheme {}
3 changes: 3 additions & 0 deletions packages/material-ui/src/styles/createTheme.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ export interface ThemeOptions extends SystemThemeOptions {
unstable_strictMode?: boolean;
}

/**
* Our [TypeScript guide on theme customization](https://material-ui.com/guides/typescript/#customization-of-theme) explains in detail how you would add custom properties.
*/
export interface Theme extends SystemTheme {
mixins: Mixins;
components?: Components;
Expand Down

0 comments on commit 86894af

Please sign in to comment.