您如何更改加载文本颜色和背景颜色或材料UI loadingButton

发布于 2025-02-12 01:58:53 字数 182 浏览 3 评论 0原文

因此,我正在使用此导入从'@mui/lab/loadingbutton';中使用LoadingButton;

我希望在按钮处于加载状态时具有不同的背景颜色和文本颜色。

该文件向目标说“ .muiloadingbutton-root”。但是我不明白如何针对任何根部成分。我仍然是材料UI的新手。

So I'm using this import LoadingButton from '@mui/lab/LoadingButton';

I want to have a different background colour and text colour than the default one when the button is in a loading state.

the documentation says to the target ".MuiLoadingButton-root". but I don't understand how to target any of the root components. I'm still fairly new to material UI.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

吾性傲以野 2025-02-19 01:58:53

文档中正在解释的是,您可以通过对“ MuiloAdingButton-root”类造型来对根组件(LoadingButton Container Div)进行样式。

基本上,您需要具有针对此类的CSS样式,并将其称为组件中:

.MuiLoadingButton-root {
  background-color: #FFF;
}

What is being explained in the documentation is that you can style the root component (the LoadingButton container div) by styling the class "MuiLoadingButton-root".

Basically, you need to have a css styling targeting this class and call it inside your component:

.MuiLoadingButton-root {
  background-color: #FFF;
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文