Sha256: 758cb3c955af0d9796260b0338c8cfebfa8334814cff381482566815f9a5bf75

Contents?: true

Size: 1.26 KB

Versions: 90

Compression:

Stored size: 1.26 KB

Contents

import React, { useState } from 'react'
import {
  Body,
  Image,
  SelectableCard,
} from '../../'

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

90 entries across 90 versions & 1 rubygems

Version Path
playbook_ui-9.3.0.alpha.inline2 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_image.jsx
playbook_ui-9.3.0.alpha.inline1 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_image.jsx
playbook_ui-9.3.0.pre.alpha.password.strength.1 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_image.jsx
playbook_ui-9.3.0 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_image.jsx
playbook_ui-9.2.2.pre.alpha.margin app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_image.jsx
playbook_ui-9.2.2 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_image.jsx
playbook_ui-9.2.1 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_image.jsx
playbook_ui-9.2.0 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_image.jsx
playbook_ui-9.1.0 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_image.jsx
playbook_ui-9.0.0 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_image.jsx
playbook_ui-8.3.0.alpha.select.pre.margin app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_image.jsx
playbook_ui-8.3.0 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_image.jsx
playbook_ui-8.2.1.pre.alpha5 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_image.jsx
playbook_ui-8.2.1.pre.alpha4 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_image.jsx
playbook_ui-8.2.1.alpha.iconacc app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_image.jsx
playbook_ui-8.2.1.pre.alpha3 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_image.jsx
playbook_ui-8.2.1.pre.alpha2 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_image.jsx
playbook_ui-8.3.0.deps2 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_image.jsx
playbook_ui-8.3.0.pre.alpha1 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_image.jsx
playbook_ui-8.2.1.pre.alpha1 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_image.jsx