0.0.12 • Published 6 years ago

@potok/switch v0.0.12

Weekly downloads
1
License
-
Repository
-
Last release
6 years ago

Switch component

Install

yarn add @potok/switch

Usage

import Switch from "@potok/switch";

const Example = () => (
  <div>
    <Switch value={true} enabledContent="Enabled" disabledContent="Disabled" />
  </div>
);

Example

const CreateIcon = require("@potok/icons/glyph/clear/add").default;
const FavIcon = require("@potok/icons/glyph/misc/fav").default;
initialState = { checked: false, iconChecked: true };

<>
  <div>
    <Switch
      enabledContent="Enabled"
      disabledContent="Disabled"
      value={state.checked}
      onChange={e => setState({ checked: e.target.checked })}
    />
  </div>

  <div style={{ marginTop: 10 }}>
    <Switch
      enabledContent="Some enabled text"
      disabledContent="Some disabled text"
      value={true}
      disabled
    />
  </div>
</>;
0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.1.0

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

7 years ago