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.19.0.pre.alpha.map1 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-11.19.0.pre.alpha.pagpassthrough1 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-11.19.0 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-11.18.0.pre.alpha.pagutility1 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-11.19.0.pre.typeahead1 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-11.18.0 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-11.17.0 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-11.15.0.pre.alpha.dependencies1 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-11.16.0.pre.alpha.paginationrails1 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-11.16.0 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-11.16.0.pre.alpha.reactupgrade1 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-11.15.0.pre.alpha.table1 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-11.16.0.pre.alpha.pagination.rails1 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-11.15.0 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-11.14.0 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-11.13.0.pre.alpha.fontawesome1 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-11.13.0 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-11.12.1.pre.alpha.charts1 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-11.12.1.pre.alpha.passphrase1 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx
playbook_ui-11.12.1 app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx