颜色改变时 PinInputField 值不改变颜色
这是双因素身份验证输入字段的代码。颜色是有条件的,具体取决于
const color = Store.get('theme') == 'dark' ? dark.color.input.color : light.color.input.color
问题是,当颜色更改时,输入字段中类型的值不会更改,除非您键入另一个值。
<PinInput
otp
size="lg"
placeholder=""
focusBorderColor="#a5a505"
autoFocus
manageFocus
onComplete={handleComplete}
>
<PinInputField mr="15px" color={color} />
<PinInputField mr="15px" color={color} />
<PinInputField mr="15px" color={color} />
<PinInputField mr="15px" color={color} />
<PinInputField mr="15px" color={color} />
<PinInputField mr="15px" color={color} />
</PinInput>
有没有办法让颜色改变时值自动改变颜色?
So this is code for a two-factor authentication input field. the color is conditional depending on
const color = Store.get('theme') == 'dark' ? dark.color.input.color : light.color.input.color
The problem is, when the color changes, the value in the input field that's type doesnt change, unless you type another value.
<PinInput
otp
size="lg"
placeholder=""
focusBorderColor="#a5a505"
autoFocus
manageFocus
onComplete={handleComplete}
>
<PinInputField mr="15px" color={color} />
<PinInputField mr="15px" color={color} />
<PinInputField mr="15px" color={color} />
<PinInputField mr="15px" color={color} />
<PinInputField mr="15px" color={color} />
<PinInputField mr="15px" color={color} />
</PinInput>
Is there a way to make the values change color automatically when color changes?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论