【问题标题】:when click on the label checbox is not checking in styled components当单击标签复选框时未检查样式组件
【发布时间】:2018-03-05 16:15:33
【问题描述】:

我希望当用户单击标签复选框时选择(自定义)仅使用样式组件,就像我们可以在 css 中做的那样,而不是使用 javascript。示例:https://stackblitz.com/edit/react-hr2vrx

【问题讨论】:

    标签: reactjs styled-components


    【解决方案1】:

    标签属性for 必须是htmlForhttps://reactjs.org/docs/dom-elements.html#htmlfor

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-09-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-01-03
      • 2018-06-17
      • 1970-01-01
      相关资源
      最近更新 更多