-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[zero] Export
extendTheme
for creating a zero-runtime theme (#40897)
- Loading branch information
1 parent
2d43ad1
commit f33e247
Showing
19 changed files
with
728 additions
and
300 deletions.
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.