@thesis-ui/toggle

0.2.1 • Public • Published

Toggle component - Thesis UI


Installation

$ yarn add @thesis-ui/toggle
$ npm install @thesis-ui/toggle

Usage

import Toggle from '@thesis-ui/toggle';

const [isOn, setIsOn] = useState(false);

function onChange() {
  setIsOn(!isOn);
}

<Toggle
  isChecked={isOn}
  value="testValue"
  labelValue={`Click me to turn ${isOn ? 'off' : 'on'}`}
  onChange={onChange}
/>

Package Sidebar

Install

npm i @thesis-ui/toggle

Weekly Downloads

5

Version

0.2.1

License

MIT

Unpacked Size

7.48 kB

Total Files

6

Last publish

Collaborators

  • kovacsgezatamas