【发布时间】:2022-01-08 23:14:57
【问题描述】:
我不知道如何使用 React hooks 将 stepper 的颜色从主要更改为成功。不幸的是,步进器没有内置的颜色方法,例如图标。而且我还没有找到任何其他方法来做到这一点。请帮忙,谢谢。
我的代码:
const steps = ['Select master blaster campaign settings','Create an ad group','Create an ad',];
const [color, setColor] = useState('primary')
const successBoxClicked = (e) => {
setColor('success')}
<Stepper activeStep={1} alternativeLabel>
{steps.map((label) => (
<Step key={label}>
<StepLabel>{label}</StepLabel>
</Step>
))}
</Stepper>
【问题讨论】:
标签: javascript css reactjs material-ui