Sha256: b7f4c1ca705a87ca1afad4cbd0301a562f6a50ab24d745b6e40baee60a84bba4

Contents?: true

Size: 1.64 KB

Versions: 1772

Compression:

Stored size: 1.64 KB

Contents

import React, { useState } from 'react'
import SelectableCard from '../_selectable_card.tsx'

const SelectableCardDefault = (props) => {
  const [selectedWithIcon, setSelectedWithIcon] = useState(true)
  const [selectedNoIcon, setSelectedNoIcon] = useState(true)
  const [unselected, setUnselected] = useState(false)
  const [disabled, setDisabled] = useState(false)

  return (
    <div className="pb--doc-demo-row">

      <SelectableCard
          checked={selectedWithIcon}
          icon
          inputId="selectedWithIcon"
          name="selectedWithIcon"
          onChange={() => setSelectedWithIcon(!selectedWithIcon)}
          value="selectedWithIcon"
          {...props}
      >
        {'Selected, with icon'}
      </SelectableCard>

      <SelectableCard
          checked={selectedNoIcon}
          inputId="selectedWithoutIcon"
          name="selectedWithoutIcon"
          onChange={() => setSelectedNoIcon(!selectedNoIcon)}
          value="selectedWithoutIcon"
          {...props}
      >
        {'Selected, without icon'}
      </SelectableCard>

      <SelectableCard
          checked={unselected}
          inputId="unselected"
          name="unselected"
          onChange={() => setUnselected(!unselected)}
          value="unselected"
          {...props}
      >
        {'Unselected'}
      </SelectableCard>

      <SelectableCard
          checked={disabled}
          disabled
          inputId="disabled"
          name="disabled"
          onChange={() => setDisabled(!disabled)}
          value="disabled"
          {...props}
      >
        {'Disabled'}
      </SelectableCard>

    </div>
  )
}

export default SelectableCardDefault

Version data entries

1,772 entries across 1,772 versions & 2 rubygems

Version Path
playbook_ui_docs-14.11.1.pre.alpha.PLAY17445539 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_default.jsx
playbook_ui-14.11.1.pre.alpha.PLAY17445539 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_default.jsx
playbook_ui_docs-14.11.1.pre.alpha.PBNTR798datepickerturbo5537 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_default.jsx
playbook_ui-14.11.1.pre.alpha.PBNTR798datepickerturbo5537 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_default.jsx
playbook_ui_docs-14.11.1.pre.alpha.pbntr703collapsiblerowsrails5536 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_default.jsx
playbook_ui-14.11.1.pre.alpha.pbntr703collapsiblerowsrails5536 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_default.jsx
playbook_ui_docs-14.11.1.pre.alpha.PLAY1751pbcontenttagpt25529 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_default.jsx
playbook_ui-14.11.1.pre.alpha.PLAY1751pbcontenttagpt25529 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_default.jsx
playbook_ui_docs-14.11.1.pre.alpha.PBNTR7495495 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_default.jsx
playbook_ui-14.11.1.pre.alpha.PBNTR7495495 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_default.jsx
playbook_ui_docs-14.12.0.pre.rc.11 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_default.jsx
playbook_ui-14.12.0.pre.rc.11 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_default.jsx
playbook_ui_docs-14.12.0.pre.rc.10 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_default.jsx
playbook_ui-14.12.0.pre.rc.10 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_default.jsx
playbook_ui_docs-14.12.0.pre.rc.9 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_default.jsx
playbook_ui-14.12.0.pre.rc.9 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_default.jsx
playbook_ui_docs-14.12.0.pre.rc.8 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_default.jsx
playbook_ui-14.12.0.pre.rc.8 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_default.jsx
playbook_ui_docs-14.12.0.pre.rc.7 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_default.jsx
playbook_ui-14.12.0.pre.rc.7 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_default.jsx