@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}
/>

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.1
    0
    • latest

Version History

Package Sidebar

Install

npm i @thesis-ui/toggle

Weekly Downloads

0

Version

0.2.1

License

MIT

Unpacked Size

7.48 kB

Total Files

6

Last publish

Collaborators

  • kovacsgezatamas