我有一个mui样式对话框,我不能使用v5 ()组件设置它的宽度。
import {
Dialog,
DialogContent,
DialogTitle,
Paper,
Typography,
} from "@mui/material";
import { Close } from "@mui/icons-material";
import { styled } from "@mui/material/styles";
import ActionButton from "./ActionButton";
i
我试图改变材料UI,DatePicker,日期,文本和日历图标颜色。
我试图将其传递样式更改为InputProps,但它只用于移除边框。
相反,没有什么改变,我试图将样式应用于theme.tsx,但这也没有帮助。任何帮助都将不胜感激。
import * as React from "react";
import Stack from "@mui/material/Stack";
import TextField from "@mui/material/TextField";
import AdapterDateFns from "@mui
我正在使用react应用程序和使用资料-ui v5,我被困在这个错误上,theme.spacing不起作用。
import { makeStyles } from "@material-ui/styles";
import React from "react";
import Drawer from "@mui/material/Drawer";
import Typography from "@mui/material/Typography";
import List from "@mui/material/List
我正在做一个多步骤的表单,我使用的材料UI组件。但是当我导入它的时候,它就显示出错误。守则是:
import React from 'react';
import { ThemeProvider } from '@mui/material/styles';
import AppBar from '@mui/material/AppBar';
import Toolbar from '@mui/material/Toolbar';
import Typography from '@mui/material/Typogra
我要在一个项目中创建一个Navbar。在我的项目中我使用
梅艳芳/图标-材料:^5.2.5
梅艳芳/材料:^5.2.6
梅花/风格:^5.2.3
现在我的文件夹结构是
Root.jsx
Navbar.jsx
styles.js
我犯了一个错误
The `styles` argument provided is invalid.
You are providing a function without a theme in the context.
One of the parent elements needs to use a ThemeP
我试图升级材料v5(来自v4)。根据,建议使用样式或sx,但我想使用makeStyles方法,就像在v4中一样。即使在v5中不推荐使用它,但也可以使用它(按照)。但是我无法在makeStyles回调函数中获得主题变量,导致无法访问未定义的属性(例如。theme.breakpoints.between...)
import makeStyles from '@mui/styles/makeStyles';
const useStyles = makeStyles((theme) => ({
// here theme variable is undefined
a
我按照教程为我的表添加页面分页,现在浏览器中出现了以下错误:
Uncaught TypeError: Cannot read property 'main' of undefined
at ButtonRoot.ownerState.ownerState (Button.js:80)
at transformedStyleArg (createStyled.js:189)
at handleInterpolation (emotion-serialize.browser.esm.js:137)
at serializeStyles (emo
我的问题是,这两个{ styled }之间有什么不同??
import { styled } from "@mui/system";
and
import styled from "styled-components";
嗨朋友们,
我使用reactjs的资料-ui创建一个网站,然后我想添加我的自定义风格的帮助样式组件到material组件(具体来说,我想改变AppBar风格)。
但我遇到了两个问题。
First problem
我试图用样式组件库创建我的自定义设计:
导入样式从“样式-组件”;
但我必须使用这么多(!重要)来更改设计,如下所示:
im
Module not found: Can't resolve '@emotion/react' in '...\node_modules\@mui\styled-engine'
在ReactJS项目中使用Material遇到编译失败的问题,我检查了@mui node_modules文件夹,但无法修复编译错误。任何有任何想法的人请与我分享。