Sha256: 7b4f5b06453307fb7602dca5cba5f061b309ded9cea9476df80a7626ffff801a

Contents?: true

Size: 658 Bytes

Versions: 84

Compression:

Stored size: 658 Bytes

Contents

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

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

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

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

export default CheckboxCustom

Version data entries

84 entries across 84 versions & 1 rubygems

Version Path
playbook_ui-5.1.0 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-5.0.3 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-5.0.2 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-5.0.1.pre.beta app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-5.1.0.pre.alpha4 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-5.1.0.pre.alpha2 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-5.1.0.pre.alpha1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-5.0.1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-5.0.1.pre.alpha1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-4.18.1.pre.alpha1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-4.18.1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-4.18.0 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-4.17.0 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-4.17.0.pre.alpha1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-4.16.0 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-4.15.0 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-4.14.0 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-4.15.1.alpha1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-4.13.1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-4.13.0 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx