简体   繁体   English

如何在 Material ui Autocomplete 中更改占位符的颜色

[英]How to change the color of placeholder in a Material ui Autocomplete

There are two different projects in which an internal library is being used in my team which provides a header in which there is a search box.在我的团队中有两个不同的项目使用了一个内部库,它提供了一个包含搜索框的标题。 In one of the projects, the placeholder text "Search" appears normally在其中一个项目中,占位符文本“搜索”正常出现

在此处输入图像描述

But in the other project when used with the same third party library, the text appears differently.但是在另一个项目中,当与相同的第三方库一起使用时,文本显示不同。

在此处输入图像描述

The third party library uses MaterialUI "Autocomplete" to implement the search Bar.第三方库使用 MaterialUI“自动完成”来实现搜索栏。

I tried to look for color and opacity properties and tried a few different things with them but none of them had an effect.我试图寻找颜色和不透明度属性,并尝试了一些不同的方法,但都没有效果。 The properties all look the same, what other property should I try to check ?这些属性看起来都一样,我应该尝试检查哪些其他属性?

You can customize the color inside the .您可以自定义 . Something like this in line 36第36行是这样的

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM