temp: add resources
This commit is contained in:
64
packages/components/src/theme/index.tsx
Normal file
64
packages/components/src/theme/index.tsx
Normal file
@@ -0,0 +1,64 @@
|
||||
import { createTheme, ThemeOptions } from '@mui/material/styles';
|
||||
import { useTheme as useMuiTheme, Theme } from '@mui/material/styles';
|
||||
import { amber } from '@mui/material/colors';
|
||||
export const themeOptions: ThemeOptions = {
|
||||
palette: {
|
||||
primary: {
|
||||
main: '#ffc107', // amber[300]
|
||||
},
|
||||
secondary: {
|
||||
main: '#ffa000', // amber[500]
|
||||
},
|
||||
divider: amber[200],
|
||||
common: {
|
||||
white: '#ffa000',
|
||||
},
|
||||
text: {
|
||||
primary: amber[600],
|
||||
secondary: amber[600],
|
||||
},
|
||||
background: {
|
||||
default: '#ffffff', // 设置默认背景颜色
|
||||
// paper: '#f5f5f5', // 设置纸张背景颜色
|
||||
},
|
||||
},
|
||||
typography: {
|
||||
// fontFamily: 'Roboto, sans-serif',
|
||||
},
|
||||
components: {
|
||||
MuiButtonBase: {
|
||||
defaultProps: {
|
||||
disableRipple: true,
|
||||
},
|
||||
},
|
||||
MuiTextField: {
|
||||
styleOverrides: {
|
||||
root: {
|
||||
'& .MuiOutlinedInput-root': {
|
||||
'& fieldset': {
|
||||
borderColor: amber[300],
|
||||
},
|
||||
'&:hover fieldset': {
|
||||
borderColor: amber[500],
|
||||
},
|
||||
'& .MuiInputBase-input': {
|
||||
color: amber[600],
|
||||
},
|
||||
},
|
||||
'& .MuiInputLabel-root': {
|
||||
color: amber[600],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
* https://bareynol.github.io/mui-theme-creator/
|
||||
*/
|
||||
export const theme = createTheme(themeOptions);
|
||||
|
||||
export const useTheme = () => {
|
||||
return useMuiTheme<Theme>();
|
||||
};
|
||||
Reference in New Issue
Block a user