Closed BeigeBadger closed 6 years ago
In https://github.com/arnthor3/react-bootstrap-toggle/blob/master/src/react-bootstrap-toggle.jsx a className property is defined, and this property is applied to the outermost div inside the render method.
className
However this property is not initialised inside the defaultProps and does not seem to be applied at all when I use it like so:
defaultProps
import React, { Component, PropTypes } from 'react'; import Toggle from 'react-bootstrap-toggle'; import 'react-bootstrap-toggle/lib/bootstrap2-toggle.css'; class MyComponent extends Component { ... render() { return ( <Toggle size={`xs`} on={`Yes`} off={`No`} onstyle={`success`} offstyle={`danger`} className={`span3`} /> ); } ...
The value that I enter for className appears to be thrown away, I also noticed that it is not mentioned in the readme file as a prop that can be set - is this a mistake or am I using it incorrectly?
NVM, using an older, locally cached version.
In https://github.com/arnthor3/react-bootstrap-toggle/blob/master/src/react-bootstrap-toggle.jsx a
className
property is defined, and this property is applied to the outermost div inside the render method.However this property is not initialised inside the
defaultProps
and does not seem to be applied at all when I use it like so:The value that I enter for
className
appears to be thrown away, I also noticed that it is not mentioned in the readme file as a prop that can be set - is this a mistake or am I using it incorrectly?