我有以下使用React-Bootstrap的JSX:
<Button bsStyle="danger pull-right" bsSize="small" onClick={() => {alert('do stuff')}}>
<Glyphicon glyph="trash" />
</Button>
这样做确实可以,但是会在控制台中显示警告:
警告:Failed prop type: Invalid prop
bsStyle
of valuedanger pull-right
supplied toButton
, expected one of["success","warning","danger","info","default","primary","link"]
。
如何最好地将pull-right
添加到样式列表中?我希望我的控制台中没有任何警告。
className
怎么样? - Andrew Li