bpk-component-switch

3.2.2 • Public • Published

bpk-component-switch

Backpack switch component.

Installation

npm install bpk-component-switch --save-dev

Usage

import React from 'react';
import BpkSwitch from 'bpk-component-switch';

export default () => (
  <div>
    <BpkSwitch label="Switched on" checked />
    <BpkSwitch label="Turned off" />
  </div>
)

Props

Property PropType Required Default Value
label Node true -
className string false null
small boolean false false

This component uses a hidden <input type="checkbox" />, so it supports all the same properties as it (for example checked).

Theme props

  • switchCheckedColor

Readme

Keywords

none

Package Sidebar

Install

npm i bpk-component-switch

Weekly Downloads

44

Version

3.2.2

License

Apache-2.0

Unpacked Size

26.7 kB

Total Files

12

Last publish

Collaborators

  • anambl
  • skyscanner-koalasquad
  • gert-jan.vercauteren
  • frugoman
  • marianeumayer-skyscanner
  • ojcurt
  • shaundon