Sha256: 76de68a4df019da6dc1e0bbc9e991af8b87e01c987739fc7c7204e301dc2f5c4

Contents?: true

Size: 1.08 KB

Versions: 147

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

147 entries across 147 versions & 1 rubygems

Version Path
playbook_ui-11.2.1 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-11.2.0 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-11.1.2 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-11.1.2.pre.alpha1 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-11.1.1 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-11.1.1.pre.alpha1 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-11.1.0 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-11.0.1 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-11.0.0 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-11.0.0.pre.alpha.2 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-11.0.0.pre.alpha.1 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-10.26.1 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-10.27.0.pre.lazysizes1 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-10.27.0.pre.datepicker1 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-10.26.0 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-10.26.0.pre.alpha5 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-10.26.0.pre.rc1 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-10.26.0.pre.alpha.sticky1 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-10.26.0.pre.alpha.display1 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-10.26.0.pre.alpha3 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx