npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-bulma-switch

v0.0.3

Published

Switch Bulma extension using react-bulma-components

Downloads

754

Readme

React-bulma-switch

Build Status Coverage Status Release Version Npm Downloads

React component for Bulma Switch extension using React-Bulma-Components

You can find the Storybook of all components here

To Install

npm install react-bulma-components react-bulma-switch

or

yarn add -E react-bulma-components react-bulma-switch

To Use

import React from 'react';
// You can import from the global component (you will need to include the css file dist/react-bulma-switch.min.css)
import Switch from 'react-bulma-switch';

// You can also include the js that also bundle the ccs (do not work with server-side rendering)
import switch from 'react-bulma-switch/full';

// [RECOMENDED]  If you use this approach configure webpack to handle sass files
import Switch from 'react-bulma-switch/lib';

export default () => (
  <div>
    <Switch value rounded>Switch Rounded</Switch>
    <Switch value thin>Switch Thin</Switch>
    <Switch value rtl>Switch Text on the left</Switch>
    <Switch value outlined>Switch Text on the left</Switch>
  </div>
);

Documentation

You can find the documentation in https://couds.github.io/react-bulma-switch

Each component import his own sass file, in this way you can reduce your css total file only including the styles you use, to enable this please configure your Webpack to handle sass files. You can use the webpack.config.js on the root folder of this repository

Some api/naming may vary of convention with the Bulma Docs, please refear to each storybook to see how to use each component (you can find the source code of the story usin ght button "Show info" on the top-right corner)

Override Bulma variables

To Override the variables set by Bulma you will need to create a sass file like this one (_variable.sass)

@import '~bulma/sass/utilities/initial-variables.sass'

// ADD HERE variables you want to override
$primary: #f4f4f4

@import '~bulma/sass/utilities/_all.sass'

After that you will need to add to your webpack configuration an alias pointing to the file

resolve {
  // Other resolve props
  alias: {
    // Other aliases
    '_variables.sass': path.resolve(__dirname, 'relative/path/to/your/file/from/webpack/config/file'),
  },
}

This page is open source. Noticed a typo? Or something unclear? Improve this page on GitHub