Sha256: 3cd9f9d38bec209cf3b3c18dc444ae3f0949365b35c7539816073773452a6134

Contents?: true

Size: 1.35 KB

Versions: 1919

Compression:

Stored size: 1.35 KB

Contents

import React, { useState } from 'react'

import Body from '../../pb_body/_body'
import Image from '../../pb_image/_image'
import SelectableCard from '../../pb_selectable_card/_selectable_card'

const SelectableCardImage = (props) => {
  const [selectedImage, setSelectedImage] = useState(true)
  const [unselectedImage, setUnselectedImage] = useState(false)

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

      <SelectableCard
          checked={selectedImage}
          icon
          inputId="selectableImage"
          name="selectableImage"
          onChange={() => setSelectedImage(!selectedImage)}
          value="selectableImage"
          {...props}
      >
        <Image
            rounded
            size="xl"
            url="https://unsplash.it/500/400/?image=634"
            {...props}
        />

        <Body>{'Add text here'}</Body>
      </SelectableCard>

      <SelectableCard
          checked={unselectedImage}
          icon
          inputId="unselectedImage"
          name="unselectedImage"
          onChange={() => setUnselectedImage(!unselectedImage)}
          value="unselectedImage"
          {...props}
      >
        <Image
            rounded
            size="xl"
            url="https://unsplash.it/500/400/?image=634"
            {...props}
        />
      </SelectableCard>

    </div>
  )
}

export default SelectableCardImage

Version data entries

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

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