Sha256: 2a4c5c975252ac279b34005c97fab211b9b38ed498797fdd7fe525693c40b1c1

Contents?: true

Size: 1.08 KB

Versions: 5

Compression:

Stored size: 1.08 KB

Contents

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

const SelectableIconDefault = (props) => {
  const [ checkSelected, toggleSelected ] = useState(true)
  const [ checkUnselected, toggleUnselected ] = useState(false)
  const [ checkDisabled, toggleDisabled ] = useState(false)

  return (

    <div className="pb--doc-demo-row">
      <SelectableIcon
          checked={checkSelected}
          icon="dollar-sign"
          inputId={10}
          onChange={() => toggleSelected(!checkSelected)}
          text="US Dollar"
          {...props}
      />

      <SelectableIcon
          checked={checkUnselected}
          icon="euro-sign"
          inputId={11}
          onChange={() => toggleUnselected(!checkUnselected)}
          text="Euro"
          {...props}
      />

      <SelectableIcon
          checked={checkDisabled}
          disabled
          icon="yen-sign"
          inputId={12}
          onChange={() => toggleDisabled(!checkDisabled)}
          text="Yen"
          {...props}
      />
    </div>
  )
}

export default SelectableIconDefault

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
playbook_ui_docs-14.11.1.pre.alpha.PBNTR440enableglobalpropspbformwith5624 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-14.11.1.pre.alpha.PBNTR440enableglobalpropspbformwith5624 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-14.12.0 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui_docs-14.12.0.pre.rc.12 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-14.12.0.pre.rc.12 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx