2.0.1 • Published 3 years ago

kodobe-react-switch v2.0.1

Weekly downloads
4
License
ISC
Repository
-
Last release
3 years ago

Kodobe React Switch

This is a simple react switch package.

Install

npm install kodobe-react-switch

or

yarn add kodobe-react-switch

Setup

import Switch from 'kodobe-react-switch';

Usage

import Switch from "kodobe-react-switch";

function App() {
    return (
        <div>
            <h3>Here is how to use a switch</h3>
            <Switch
                disabled
                isActive={true}
                onSwitch={(t) => console.log(t)}
            />
        </div>
    );
}

Options

  • isActive : state of the switch (boolean, default=false)
  • disabled : if the switch can be toggled (boolean, default=false)
  • onSwitch : get's alternate state of isActive (function)
  • style : (object)
  • className : (string)
2.0.1

3 years ago

2.0.0

3 years ago

1.0.1

3 years ago