如何将value
中TextField
中的文本颜色更改为红色?
我已经尝试过在互联网上找到的帮助,但是它不起作用,我认为这可能是因为我正在使用Typescript,而我是Typescript的新手。
import React, { useEffect, useState } from 'react';
import { TextField } from '@material-ui/core';
<TextField label="Date" value={object.date} fullWidth />
答案 0 :(得分:1)
您可以使用输入组件的样式设置color属性。
<TextField inputProps={{ style: { color: "red" } }} />