Sha256: 7f3bc0e739d18e025ca991a7d8fa5f7fe2846b35b6dca70386204d43fdad4ff0

Contents?: true

Size: 1.24 KB

Versions: 160

Compression:

Stored size: 1.24 KB

Contents

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

const RadioCustom = () => {
  const [choice, setChoice] = useState('power')

  const handleOnChange = ({ target }) => {
    setChoice(target.value)
  }

  return (
    <div>
      <p>
        {'Your choice is: '}
        <code>{choice}</code>
      </p>
      <br />
      <Radio
          className="my_custom_class"
          label="Custom Power"
      >
        <input
            checked={choice === 'power'}
            name="custom"
            onChange={handleOnChange}
            type="radio"
            value="power"
        />
      </Radio>
      <br />
      <Radio
          className="my_custom_class"
          label="Custom Nitro"
      >
        <input
            checked={choice === 'nitro'}
            name="custom"
            onChange={handleOnChange}
            type="radio"
            value="nitro"
        />
      </Radio>
      <br />
      <Radio
          className="my_custom_class"
          label="Custom Google"
      >
        <input
            checked={choice === 'google'}
            name="custom"
            onChange={handleOnChange}
            type="radio"
            value="google"
        />
      </Radio>
    </div>
  )
}
export default RadioCustom

Version data entries

160 entries across 160 versions & 1 rubygems

Version Path
playbook_ui-7.4.1 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.4.0.pre.alpha6 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.4.0.pre.alpha5 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.4.0 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.4.0.pre.test4 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.4.0.pre.test3 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.4.0.pre.test2 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.4.0.pre.alpha4 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.4.0.pre.alpha2 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.4.0.pre.alpha1 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.3.0.pre.alpha12 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.3.0 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.3.0.pre.alpha11 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.3.0.pre.alpha10 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.3.0.pre.alpha9 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.3.0.pre.alpha8 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.3.0.pre.alpha7 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.3.0.pre.alpha6 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.3.0.pre.alpha5 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.3.0.pre.alpha4 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx