Sha256: 0ee61d4e54ac9ace8b54b10246412b56b681c1a4a79512616ff7441bb238254e

Contents?: true

Size: 710 Bytes

Versions: 1978

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,978 entries across 1,978 versions & 2 rubygems

Version Path
playbook_ui-12.3.1.pre.alpha.phone1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-12.3.1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-12.3.0.pre.alpha.patchtest1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-12.3.0 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-12.2.0 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-12.1.0 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-12.0.0 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-11.20.0.pre.alpha.passthrough1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-11.20.0.pre.alpha.railsdialog1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-11.20.0.pre.alpha.focus1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-11.20.0 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-11.19.0.pre.alpha.map1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-11.19.0.pre.alpha.pagpassthrough1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-11.19.0 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-11.18.0.pre.alpha.pagutility1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-11.19.0.pre.typeahead1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-11.18.0 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-11.17.0 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-11.15.0.pre.alpha.dependencies1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-11.16.0.pre.alpha.paginationrails1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx