cf-component-toggle
Cloudflare Toggle Component
Installation
Installation with yarn is recommended
$ yarn add cf-component-toggle
Usage
import React from 'react';import Toggle from 'cf-component-toggle'; Component { ; thisstate = toggleValue: false ; } { this; } { return <div> <p>Example Toggle</p> <Toggle ="Example Toggle" ="example" = = /> <p>Disabled</p> <Toggle ="Disabled Toggle" ="example-disabled" = = /> <p> `If you specifically don't want to use a label then you must pass false` </p> <p>Note: Designed to work with redux-form</p> </div> ; } ;