New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

mi-toggle-switch

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mi-toggle-switch

![version](https://img.shields.io/npm/v/mi-toggle-switch.svg) ![license](https://img.shields.io/npm/l/mi-toggle-switch.svg) ![type](https://img.shields.io/npm/types/mi-toggle-switch.svg) ![npm](https://img.shields.io/npm/dm/mi-toggle-switch.svg)

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

Mi-Toggle-Switch

version license type npm

Mi-Toggle-Switch is a React component library build with styled-components. It will help you create a Toggle Switch component very fast and extremely easy in ReactJS.

Mi-Toggle-Switch component

Installation

You can use either npm

npm i mi-toggle-switch

or yarn

yarn add mi-toggle-switch

Basic Usage

import React from 'react';
import { MiToggleSwitch } from 'mi-toggle-switch';

class App extends React.Component {
  render() {
    return (
      <MiToggleSwitch />
    );
  }
}

export default App;

PropTypes and defaultProps

PropTypeDefaultDescription
isEnablebooleanfalseIf true, the switch is set to checked. If false, it is not checked.
typeoneOf(['rectangular', 'rounded'])'rounded'If 'rectangular' => create Rectangular Toggle Switch. If 'rounded' => create Rounded Toggle Switch
activeColorstring'#62c28e'Set color when it is checked
deactiveColorstring'#cccccc'Set color when it is not checked
widthnumber32*1.625Set width of the Toggle Switch
heightnumber32Set height of the Toggle Switch
ballColorstring'#ffffff'Set ball background color
spacingnumber2Set space between ball and Toggle Switch container
onClickFunctionundefinedCallback when click Toggle Switch
onStateChangedFunctionundefinedCallback when change state Toggle Switch
isStateChangebooleantrueEnable and disable change state Toggle Switch when click it.

License

Mi-Toggle-Switch is MIT licensed.

Keywords

react

FAQs

Package last updated on 08 Apr 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts