-
-
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
[zero] Export extendTheme
for creating a zero-runtime theme
#40897
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
badff46
update README
siriwatknp bd59f28
add extendTheme to zero-runtime
siriwatknp dbd3376
fix types
siriwatknp 28c6c01
add readme
siriwatknp 2dff8fe
fix all edge cases
siriwatknp 1760d6c
update README
siriwatknp de4d768
remove log files
siriwatknp fe211f4
don't export ThemeInput
siriwatknp 4210694
update readme
siriwatknp d37a037
update README
siriwatknp e7ea470
add plugin if theme is provided
siriwatknp c4e8450
update README as suggested
siriwatknp 00e8ea8
Merge branch 'master' of https://github.com/mui/material-ui into syst…
siriwatknp cfd6fbe
Merge branch 'master' of https://github.com/mui/material-ui into syst…
siriwatknp ad407be
return null if no theme
siriwatknp 590a052
update README
siriwatknp c457155
Apply suggestions from code review
siriwatknp cdfc7a0
Merge branch 'master' of https://github.com/mui/material-ui into syst…
siriwatknp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,34 @@ | ||
import type { Theme } from '@mui/material/styles'; | ||
import type {} from '@mui/material/themeCssVarsAugmentation'; | ||
import '@mui/zero-runtime/theme'; | ||
import type { ExtendTheme } from '@mui/zero-runtime'; | ||
|
||
declare module '@mui/zero-runtime/theme' { | ||
export interface ThemeArgs { | ||
theme: Omit<Theme, 'applyStyles'> & { | ||
applyStyles: ( | ||
colorScheme: 'light' | 'dark', | ||
styles: Record<string, any>, | ||
) => Record<string, any>; | ||
interface ThemeTokens { | ||
'max-width': string; | ||
'border-radius': string; | ||
'font-mono': string; | ||
'foreground-rgb': string; | ||
'background-start-rgb': string; | ||
'background-end-rgb': string; | ||
'primary-glow': string; | ||
'secondary-glow': string; | ||
title: { | ||
'start-rgb': string; | ||
'end-rgb': string; | ||
border: string; | ||
}; | ||
callout: { | ||
rgb: string; | ||
'border-rgb': string; | ||
}; | ||
card: { | ||
rgb: string; | ||
'border-rgb': string; | ||
}; | ||
} | ||
|
||
interface ThemeArgs { | ||
theme: ExtendTheme<{ | ||
colorScheme: 'light' | 'dark'; | ||
tokens: ThemeTokens; | ||
}>; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Moved to theme in
next.config.js