1.0.7 • Published 6 years ago

react-triple-toggle v1.0.7

Weekly downloads
11
License
MIT
Repository
github
Last release
6 years ago

Installation

npm i react-triple-toggle --save

Usage

Uncontrolled component

import React, { useState } from "react";
import ReactDOM from "react-dom";
import { Toggle } from "react-triple-toggle";


function App() {

  return <Toggle />;
}

const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);

Edit react-triple-toggle-2

API

PropTypeDescription
checkedobjectUse this if you want to treat the toggle as a controlled component.
defaultCheckedobjectUse this if you want to treat the toggle as an uncontrolled component.
onChangefunctionA function which acts as a callback when the toggle is changed.
disabledbooleanIf true, the toggle is disabled. If false, the toggle is enabled

Built With

  • React - A JavaScript library for building user interfaces

License

MIT Licensed. Copyright (c) George Bardi 2019.

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.0.1

6 years ago