我正在使用Styled Components v2.1.1。 该文件说,为了避免不必要的包装,我们可以使用.attrs
构造函数。请参阅:https://www.styled-components.com/docs/basics#attaching-additional-props附加其他道具时在控制台上显示“未知道具”警告
我试图使用它,但我总是收到以下警告在控制台:
Warning: Unknown props `margin`, `padding` on <input> tag. Remove these props from the element. For details, see (removed)
in input (created by styled.input)
in styled.input (created by InputContainer)
in div (created by InputContainer)
in InputContainer
我创建了一个的WebPack斌,显示错误:https://www.webpackbin.com/bins/-KpKbVG-Ed0jysHeFVVY
上午我以错误的方式使用它还是有问题?