Skip to content

[docs] Add InitColorSchemeScript docs and API #45927

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

Merged
merged 11 commits into from
Apr 23, 2025

Conversation

siriwatknp
Copy link
Member

@siriwatknp siriwatknp commented Apr 16, 2025

closes #43416

The docs is missing this component (InitColorSchemeScript).

Changes are based on #43416 (comment)

  • 1. Fix the code comment
  • 2. Create the API page for the InitColorSchemeScript component.
  • 3. Flatten the docs for the colorSchemeSelector. People shouldn't have to click to find meaningful docs content, it should be scrollable/searchable. For example https://tailwindcss.com/docs/dark-mode#customizing-the-selector this looks correct.
  • 4. Add some demos for InitColorSchemeScript. This is not possible to showcase the component as a demo because it requires server rendering.

@siriwatknp siriwatknp added the docs Improvements or additions to the documentation label Apr 16, 2025
@mui-bot
Copy link

mui-bot commented Apr 16, 2025

Netlify deploy preview

@mui/material: parsed: +0.10% , gzip: +0.06%
@mui/material/InitColorSchemeScript: parsed: +18.74% , gzip: +5.86%

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against 71f841f

@@ -1,4 +1,5 @@
import * as React from 'react';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change in this file is required to generate the API page.
All of the behavior remains the same.

@@ -465,3 +465,5 @@ export { default as generateUtilityClasses } from './generateUtilityClasses';

export { default as Unstable_TrapFocus } from './Unstable_TrapFocus';
export * from './Unstable_TrapFocus';

export { default as InitColorSchemeScript } from './InitColorSchemeScript';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Required to generate API page.

@siriwatknp siriwatknp added the package: material-ui Specific to @mui/material label Apr 16, 2025
Copy link
Contributor

@mapache-salvaje mapache-salvaje left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one last typo (that I might have introduced in my last review 😅) otherwise I think this is good to go!

…lor-scheme-script.md

Co-authored-by: mapache-salvaje <[email protected]>
Signed-off-by: Siriwat K <[email protected]>
@siriwatknp siriwatknp enabled auto-merge (squash) April 23, 2025 01:41
@siriwatknp siriwatknp merged commit f32c76c into mui:master Apr 23, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation package: material-ui Specific to @mui/material
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[system] Missing quotes in InitColorSchemeScript.tsx
3 participants