Comments (7)
What exactly do you want to style?
There is a small example for the onClick in the readme.
I will try to commit a couple of examples asap.
from react-bootstrap-toggle.
- I would like to style the button with example of being able to pass additional props such as class name or id. I would like to be able to change the color of the button and the slider. I would like to see an example if we can add icons to the button in addition to text.
- I would like to know how the onClick button works with a example such as triggering an event. It could be simple as toggle a message "Hello React World!" into the HTML page. I am using event and state to trigger a change in state object to set value to "Complete".
If I come up with any more use cases, I will post here.
from react-bootstrap-toggle.
I added a folder, "examples", I threw a couple of comments there.
Regarding the styles, the component adds a prefix to the classnames you pass in the offstyle and the onstyle props with "btn". So if you would create a custom class 'off_style' you would need to add the prefix 'btn-' to the name so it would be 'btn-off_style'. Yeah, this is begging for a more elegant solution, I know..
from react-bootstrap-toggle.
Okay! I shall take a look! Thank you!
from react-bootstrap-toggle.
Would it be possible you push fix#22 to npm? I close out this issue when Issue#22 has been completed
from react-bootstrap-toggle.
Nice, I published, hope it works.
from react-bootstrap-toggle.
Thanks!
from react-bootstrap-toggle.
Related Issues (20)
- There's no Toggle component HOT 2
- deprecations in react 15.5.0 HOT 5
- Warning: Accessing PropTypes via the main React package is deprecated HOT 1
- Disabled is not working HOT 2
- Enzyme hangs when trying to mount a component with "ToggleButton" in it HOT 2
- Setting height or width alone doesn't do anything HOT 1
- onClick callback HOT 4
- Add TypeScript type definitions HOT 3
- Allow to set width 100% HOT 5
- react v16 HOT 3
- Remove dev files when publish HOT 10
- broken npm package HOT 3
- Any disable api? HOT 5
- `className` prop being ignored HOT 1
- Bootstrap 4 support HOT 7
- Jest infinite loop HOT 4
- Publish 2.3.2 to npm HOT 5
- Does not support FontAwesomeIcons in labels HOT 1
- Looking for maintainers
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-bootstrap-toggle.