Sha256: 70f70e8c51c6fb5e8d60616244c0cc0a3da9d16cce0c05ef1361f740dc2c85dd

Contents?: true

Size: 798 Bytes

Versions: 43

Compression:

Stored size: 798 Bytes

Contents

// @flow

import React, { useState } from 'react'
import { Toggle } from '../..'

const ToggleSize = () => {
  const [choice, setChoice] = useState(false)

  const handleOnChange = ({ target }) => {
    setChoice(target.value = !choice)
  }

  return (
    <>
      <Toggle
          checked={choice}
          size="sm"
      >
        <input
            name="toggleSmall"
            onChange={handleOnChange}
            type="checkbox"
            value="toggleSmall"
        />
      </Toggle>

      <br />

      <Toggle
          checked={choice}
          size="md"
      >
        <input
            name="toggleMedium"
            onChange={handleOnChange}
            type="checkbox"
            value="toggleMedium"
        />
      </Toggle>
    </>
  )
}

export default ToggleSize

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
playbook_ui-7.3.0.pre.alpha2 app/pb_kits/playbook/pb_toggle/docs/_toggle_size.jsx
playbook_ui-6.7.0.pre.alpha1 app/pb_kits/playbook/pb_toggle/docs/_toggle_size.jsx
playbook_ui-6.7.0 app/pb_kits/playbook/pb_toggle/docs/_toggle_size.jsx
playbook_ui-6.6.1 app/pb_kits/playbook/pb_toggle/docs/_toggle_size.jsx
playbook_ui-7.0.0.pre.alpha10 app/pb_kits/playbook/pb_toggle/docs/_toggle_size.jsx
playbook_ui-6.6.0 app/pb_kits/playbook/pb_toggle/docs/_toggle_size.jsx
playbook_ui-6.5.2 app/pb_kits/playbook/pb_toggle/docs/_toggle_size.jsx
playbook_ui-7.0.1.pre.alpha12 app/pb_kits/playbook/pb_toggle/docs/_toggle_size.jsx
playbook_ui-7.0.1.pre.alpha11 app/pb_kits/playbook/pb_toggle/docs/_toggle_size.jsx
playbook_ui-7.0.1.pre.alpha10 app/pb_kits/playbook/pb_toggle/docs/_toggle_size.jsx
playbook_ui-7.0.1.pre.alpha9 app/pb_kits/playbook/pb_toggle/docs/_toggle_size.jsx
playbook_ui-6.5.1 app/pb_kits/playbook/pb_toggle/docs/_toggle_size.jsx
playbook_ui-6.5.0 app/pb_kits/playbook/pb_toggle/docs/_toggle_size.jsx
playbook_ui-7.0.1.pre.alpha8 app/pb_kits/playbook/pb_toggle/docs/_toggle_size.jsx
playbook_ui-7.0.1.pre.alpha7 app/pb_kits/playbook/pb_toggle/docs/_toggle_size.jsx
playbook_ui-7.0.1.pre.alpha6 app/pb_kits/playbook/pb_toggle/docs/_toggle_size.jsx
playbook_ui-7.0.1.pre.alpha5 app/pb_kits/playbook/pb_toggle/docs/_toggle_size.jsx
playbook_ui-7.0.1.pre.alpha4 app/pb_kits/playbook/pb_toggle/docs/_toggle_size.jsx
playbook_ui-7.0.1.pre.alpha3 app/pb_kits/playbook/pb_toggle/docs/_toggle_size.jsx
playbook_ui-7.0.1.pre.alpha2 app/pb_kits/playbook/pb_toggle/docs/_toggle_size.jsx