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.11.1 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.11.0 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.11.0.pre.alpha1 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.10.0 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.9.0 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.8.4 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.8.3 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.8.2 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.8.1 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.8.0 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.7.0.pre.alpha1 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.7.0 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.6.2.pre.alpha1 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.6.2 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.6.1.pre.alpha1 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.6.1 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.6.0 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.5.1 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.5.0 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
playbook_ui-7.4.2 app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx