-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[docs] Improve the Getting Started documentation content #30808
Changes from all commits
cb46387
d410dcf
6b13a4b
38a763c
4e0d6dc
ce3e8fc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -177,10 +177,6 @@ const StyledSlider = styled(Slider, { | |
|
||
{{"demo": "pages/customization/how-to-customize/DynamicCSSVariables.js"}} | ||
|
||
### Theme nesting | ||
|
||
{{"demo": "pages/customization/how-to-customize/DynamicThemeNesting.js"}} | ||
|
||
## 4. Global theme variation | ||
|
||
In order to promote consistency between components, and manage the user interface appearance as a whole, MUI provides a mechanism to apply global changes. | ||
|
@@ -225,7 +221,3 @@ If you are already using the [CssBaseline](/components/css-baseline/) component | |
) | ||
} | ||
``` | ||
|
||
## 6. Custom class name | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not relevant here. |
||
|
||
Check out [ClassName Generator](/guides/classname-generator/) section for more details. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -160,30 +160,7 @@ theme = createTheme(theme, { | |
}); | ||
``` | ||
|
||
Think of creating a theme as a two-step composition process: first, you define the basic design options; then, you'll use these design options to compose other options (example above) or to override the design of specific components (example below). | ||
|
||
```js | ||
import { createTheme } from '@mui/material/styles'; | ||
|
||
let theme = createTheme({ | ||
shape: { | ||
borderRadius: 4, | ||
}, | ||
}); | ||
|
||
theme = createTheme(theme, { | ||
components: { | ||
MuiChip: { | ||
styleOverrides: { | ||
root: { | ||
// apply theme's border-radius instead of component's default | ||
borderRadius: theme.shape.borderRadius, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}); | ||
``` | ||
Think of creating a theme as a two-step composition process: first, you define the basic design options; then, you'll use these design options to compose other options. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We support now callbacks in the |
||
|
||
### `responsiveFontSizes(theme, options) => theme` | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,6 +52,7 @@ If you want to start with a more complete and real-world example, you could take | |
- All PWA features included (SW, Notifications, deferred installation prompt and more) | ||
- Optimized and scalable performance (all ~100 points on Lighthouse) | ||
|
||
<!-- TODO: revert this once it is migrated to v5 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's still using v4, we should not link it until it is upgraded. It is misleading for people first coming to the documentaiton. |
||
- [React SaaS Template](https://github.com/dunky11/react-saas-template): | ||
|
||
- ![stars](https://img.shields.io/github/stars/dunky11/react-saas-template.svg?style=social&label=Star) | ||
|
@@ -60,23 +61,17 @@ If you want to start with a more complete and real-world example, you could take | |
- Fully routed using react-router | ||
- Lazy loads components to boost performance | ||
- Components for statistics, text with emoji support, image upload and much more... | ||
--> | ||
|
||
<!-- TODO: revert this once it is migrated to v5 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here, still depends on v4. |
||
- [Material Sense](https://github.com/alexanmtz/material-sense): | ||
|
||
- ![stars](https://img.shields.io/github/stars/alexanmtz/material-sense.svg?style=social&label=Star) | ||
- Graph using recharts | ||
- React Router included with a navigation example | ||
- A docker container with an Nginx server for production build | ||
- Created with Create React App | ||
|
||
- [RMUIF](https://github.com/rmuif/web): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not maintained anymore, depends on v4. |
||
|
||
- ![stars](https://img.shields.io/github/stars/rmuif/web.svg?style=social&label=Star) | ||
- Bootstrapped with Create React App | ||
- Firebase back-end with most of their products for the web included, e.g., Authentication and Cloud Firestore | ||
- Routing with React Router, including protected routes and error handling | ||
- Extensive and well-tested mobile support with full-screen dialogs and swipeable tabs | ||
- Cross-platform application monitoring with Sentry | ||
--> | ||
|
||
### Paid | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't recommend using nested themes for changing the look of the component based on prop. It is misleading. The nested theme has a different purpose, and it is described on different pages.