🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@potok/switch

Package Overview
Dependencies
Maintainers
6
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@potok/switch

Potok.io UI Switch component

latest
npmnpm
Version
0.0.12
Version published
Maintainers
6
Created
Source

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>
</>;

FAQs

Package last updated on 22 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts