Sha256: 0ee61d4e54ac9ace8b54b10246412b56b681c1a4a79512616ff7441bb238254e

Contents?: true

Size: 710 Bytes

Versions: 1919

Compression:

Stored size: 710 Bytes

Contents

import React, { useState } from 'react'

import Checkbox from '../_checkbox'

const CheckboxCustom = (props) => {
  const [checked, setChecked] = useState(false)

  const handleOnChange = () => {
    setChecked(!checked)
  }

  return (
    <div>
      {`The checkbox is ${checked ? 'checked' : 'unchecked'}.`}
      <br />
      <br />
      <div>
        <Checkbox
            text="Toggle Me"
            {...props}
        >
          <input
              checked={checked}
              name="custom-name"
              onChange={handleOnChange}
              type="checkbox"
              value="custom-value"
          />
        </Checkbox>
      </div>
    </div>
  )
}

export default CheckboxCustom

Version data entries

1,919 entries across 1,919 versions & 2 rubygems

Version Path
playbook_ui-10.23.0.pre.alpha2 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-10.23.0.pre.cachetest app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-10.23.0.pre.alpha1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-10.22.1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-10.22.0 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-10.21.1.pre.alpha1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-10.21.0.pre.alpha.lightbox.2 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-10.21.0 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-10.21.0.pre.alpha.lightbox app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-10.21.0.pre.alpha.rg1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-10.21.0.pre.alpha.jg1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-10.21.0.pre.alpha.na1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-10.21.0.pre.alpha.jd1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-10.20.0 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-10.19.0 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-10.19.0.pre.lightbox app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-10.18.2 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-10.19.0.pre.popover.alpha1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-10.18.1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-10.18.0 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx