【发布时间】:2021-04-04 10:53:10
【问题描述】:
我正在使用 React 引导库中的 ProgressBar,我不知道为什么它不能正常工作
这是代码
<div>
<p>{selectedOption_1 ? <span><b>Your Choice</b> 👉 </span> : null} {props.location.state.option1}</p>
<p style={{fontSize: "small"}}>Votes: {props.location.state.optionOneVotes} </p>
<ProgressBar now={optionOnePercentage} animated variant="warning" striped label={`${optionOnePercentage}%`} />
</div>
即使我传递了硬编码的值,结果也是一样的
<ProgressBar now={60} />
<ProgressBar now='60' animated variant="warning" />
【问题讨论】:
标签: css reactjs progress-bar react-bootstrap