Sha256: 0316ba2b3449a4dded8a77ae0ec5d9c32cdf7730bd93a98500988354918bb4ed

Contents?: true

Size: 1.12 KB

Versions: 151

Compression:

Stored size: 1.12 KB

Contents

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

const SelectableIconSingleSelect = () => {
  const [ selectedFormat, toggleFormat ] = useState(null)

  return (

    <div className="pb--doc-demo-row">
      <SelectableIcon
          checked={selectedFormat === 'Cassette'}
          icon="cassette-tape"
          inputId={13}
          multi={false}
          name="music-format"
          onChange={() => toggleFormat('Cassette')}
          text="Cassette"
          value="Cassette"
      />

      <SelectableIcon
          checked={selectedFormat === 'CD'}
          icon="compact-disc"
          inputId={14}
          multi={false}
          name="music-format"
          onChange={() => toggleFormat('CD')}
          text="CD"
          value="CD"
      />

      <SelectableIcon
          checked={selectedFormat === 'Vinyl'}
          icon="album-collection"
          inputId={15}
          multi={false}
          name="music-format"
          onChange={() => toggleFormat('Vinyl')}
          text="Vinyl"
          value="Vinyl"
      />
    </div>
  )
}

export default SelectableIconSingleSelect

Version data entries

151 entries across 151 versions & 1 rubygems

Version Path
playbook_ui-6.1.0.pre.alpha3 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_single_select.jsx
playbook_ui-6.1.0.pre.alpha2 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_single_select.jsx
playbook_ui-6.1.0.pre.alpha1 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_single_select.jsx
playbook_ui-6.1.0 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_single_select.jsx
playbook_ui-6.0.1.pre.alpha6 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_single_select.jsx
playbook_ui-6.0.1.pre.alpha5 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_single_select.jsx
playbook_ui-6.0.1.pre.alpha4 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_single_select.jsx
playbook_ui-6.0.1.pre.alpha3 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_single_select.jsx
playbook_ui-6.0.1.pre.alpha2 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_single_select.jsx
playbook_ui-5.2.0.pre.alpha15 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_single_select.jsx
playbook_ui-5.2.0.pre.alpha14 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_single_select.jsx
playbook_ui-5.2.0.pre.alpha13 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_single_select.jsx
playbook_ui-6.0.1 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_single_select.jsx
playbook_ui-5.2.0.pre.alpha12 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_single_select.jsx
playbook_ui-6.0.0 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_single_select.jsx
playbook_ui-5.2.0.pre.alpha11 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_single_select.jsx
playbook_ui-5.5.1.pre.alpha4 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_single_select.jsx
playbook_ui-5.5.1.pre.alpha3 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_single_select.jsx
playbook_ui-5.5.1.pre.alpha2 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_single_select.jsx
playbook_ui-5.5.1.pre.alpha1 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_single_select.jsx