问题标签 [react-with-styles]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
678 浏览

reactjs - 自定义popover材质-ui形状

我正在使用 popover,目前,它是一个普通的矩形,位于 box 的正下方。我想添加一个像指针这样的小三角形,让它看起来更漂亮,并且可能添加边距或填充顶部,这样它就会从盒子里放一点,就像这样

这就是我所说的弹出框

我用 withStyles 修改了论文

如何添加小三角形并调整 popover 的 transformOrigin 的位置(可能添加填充/边距)?

0 投票
1 回答
43 浏览

react-native - React Switch withStyles disabled coloration

I am trying to create color scheme for a react Switch that includes a disabled customized color. I have a customized Switch that goes red and green with an on and off text. I mostly pieced it together from other examples. I am uncertain what I need in the withStyles have greyed out colors when the switch is disabled.

In the below example I want to grey out the bottom two since they are disabled

https://codesandbox.io/s/material-demo-forked-9cn2w?file=/demo.js

I have had quite a few issues piecing together withStyles options on other components as well. Is there documentation that I missed that would outline things like the '&:before' / 'track' / 'checked' keywords? They are seem specific to the Switch component, so do I need to dig into the Switch documentation more?

0 投票
1 回答
65 浏览

css - MaterialUI withStyles,尝试深入到禁用的开关 css 覆盖

我正在前端使用 react 和 MaterialUI 进行开发,并且我有一堆自定义输入。除了这个之外,一切都运行良好。无论我使用哪种选择器组合,我似乎都无法指向正确的选择器来更改这种黑色。

此外,如果能够通过查看元素选择器以明确的方式进行识别,从而深入到正确的组件中,那就太好了。有没有办法做到这一点(教一个人钓鱼之类的东西)。这是我检查元素时的图像以及我试图获得的颜色。

这是样式对象:

这是我检查元素时的图像以及我试图获得的颜色。

0 投票
1 回答
348 浏览

css - React Material-UI - 在 TablePagination 组件中样式化显示的行标签

由于显示的行标签的宽度发生变化,我遇到了 Material-UI TablePagination组件按钮从光标下方“转义”的问题:

在此处输入图像描述

是来自 Material-UI 文档的修改示例。要重现该问题,请单击“下一页”按钮并看到它向右移动。

防止按钮移动的规范方法是什么?

0 投票
1 回答
305 浏览

css - 材质ui分页组件文本颜色为灰色

我正在使用 Material UI 的分页组件,并希望组件的文本部分为灰色。我想要的颜色是白色的动作按钮和灰色的文本部分。有什么办法可以让我决定文本部分的颜色吗?本质上希望文本像照片中的左操作箭头一样是灰色的。

在此处输入图像描述

0 投票
1 回答
36 浏览

javascript - Material-UI:提供给 classes 道具的键 `paperFullWidth` 未在 WithStyles(ForwardRef(Dialog)) 中实现

Material-UI:paperFullWidth提供给 classes 属性的键未在 WithStyles(ForwardRef(Dialog)) 中实现。您只能覆盖以下之一:root。