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-6.6.1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-7.0.0.pre.alpha10 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-6.6.0 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-6.5.2 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-6.5.1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-6.5.0 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-6.4.2 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-7.0.0.pre.alpha9 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-7.0.0.pre.alpha8 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-7.0.0.pre.alpha7 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-6.4.1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-7.0.0.pre.alpha6 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-7.0.0.pre.alpha5 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-6.4.0 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-6.3.1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-7.0.0.pre.alpha4 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-7.0.0.pre.alpha3 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-7.0.0.pre.alpha2 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-6.3.0 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx
playbook_ui-6.2.1 app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx