Coder Social home page Coder Social logo

Comments (7)

arnthor3 avatar arnthor3 commented on May 5, 2024

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.

titse avatar titse commented on May 5, 2024
  1. 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.
  2. 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.

arnthor3 avatar arnthor3 commented on May 5, 2024

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.

titse avatar titse commented on May 5, 2024

Okay! I shall take a look! Thank you!

from react-bootstrap-toggle.

titse avatar titse commented on May 5, 2024

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.

arnthor3 avatar arnthor3 commented on May 5, 2024

Nice, I published, hope it works.

from react-bootstrap-toggle.

titse avatar titse commented on May 5, 2024

Thanks!

from react-bootstrap-toggle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.