fix: fixbug theme

This commit is contained in:
熊潇 2025-04-03 22:50:43 +08:00
parent a857afbb2c
commit c7763cddc3
4 changed files with 12 additions and 13 deletions

View File

@ -15,10 +15,10 @@
"dependencies": {
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@mui/material": "^6.4.7",
"react": "19.0.0",
"react-dom": "19.0.0",
"react-hook-form": "^7.54.2"
"@mui/material": "^7.0.1",
"react": "19.1.0",
"react-dom": "19.1.0",
"react-hook-form": "^7.55.0"
},
"exports": {
".": "./src/index.tsx",
@ -26,7 +26,7 @@
},
"devDependencies": {
"clsx": "^2.1.1",
"tailwind-merge": "^3.0.2"
"tailwind-merge": "^3.1.0"
},
"publishConfig": {
"access": "public"

View File

@ -1,4 +1,4 @@
import MuiButton, { ButtonProps } from '@mui/material/Button';
import { Button as MuiButton, ButtonProps } from '@mui/material';
export const Button = (props: ButtonProps) => {
return <MuiButton {...props} />;
@ -7,7 +7,7 @@ export const Button = (props: ButtonProps) => {
export const IconButton = (props: ButtonProps) => {
const { variant = 'contained', color = 'primary', sx, children, ...rest } = props;
return (
<MuiButton variant={variant} color={color} {...rest} sx={{ color: 'white', minWidth: '32px', padding: '8px', ...sx }}>
<MuiButton variant={variant} color={color} {...rest} sx={{ color: 'white', minWidth: '24px', padding: '8px', ...sx }}>
{children}
</MuiButton>
);

View File

@ -7,7 +7,6 @@ type SelectProps = {
export const Select = React.forwardRef((props: SelectProps, ref) => {
const { options, ...rest } = props;
console.log(props, 'props');
return (
<MuiSelect {...rest} ref={ref}>
{options?.map((option) => (

View File

@ -1,7 +1,7 @@
import { createTheme, Shadows, ThemeOptions } from '@mui/material/styles';
import { useTheme as useMuiTheme, Theme } from '@mui/material/styles';
import { createTheme, Shadows, ThemeOptions } from '@mui/material';
import { useTheme as useMuiTheme, Theme } from '@mui/material';
import { amber, red } from '@mui/material/colors';
import { ThemeProvider } from '@mui/material/styles';
import { ThemeProvider } from '@mui/material';
const generateShadows = (color: string): Shadows => {
return [
'none',