Sha256: d0e1fcc7afa87c5f3290d1b143e6fcfda2a4fdab88e9e51da66c6686662ff788

Contents?: true

Size: 707 Bytes

Versions: 67

Compression:

Stored size: 707 Bytes

Contents

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

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

67 entries across 67 versions & 1 rubygems

Version Path
playbook_ui-9.19.0 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-9.19.0.pre.alphafonts app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-9.18.0.flow.bin.alpha app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-9.18.0 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-9.17.0 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-9.17.0.pre.decouple.website2 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-9.16.0 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-9.15.0 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-9.15.0.pre.decouple.website1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-9.14.1.alpha.radio.alignment app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-9.14.1.alpha.highcharts9 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-9.14.1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-9.13.0 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-9.12.0 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-9.12.0.pre.text.addon app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-9.11.0 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-9.10.0 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-9.10.0.pre.date.time.stacked.1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-9.10.0.pre.alpha2 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-9.10.0.pre.alpha1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx