Sha256: 3293e54ccd55bd035d9bd2cec272a0fc3b23f85c339f275b0783aa29bfc6ae0f

Contents?: true

Size: 1.38 KB

Versions: 4

Compression:

Stored size: 1.38 KB

Contents

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

class SelectableCardImage extends React.Component {
  state = {
    selectableImage: true,
    unselectedImage: false,
  }

  handleSelect = (event) => {
    this.setState({
      [event.target.id]: event.target.checked,
    })
  }

  render(props) {
    return (
      <div className="pb--doc-demo-row">

        <SelectableCard
            checked={this.state.selectableImage}
            icon
            inputId="selectableImage"
            name="selectableImage"
            onChange={this.handleSelect}
            value="selectableImage"
            {...props}
        >
          <Image
              rounded
              size="xl"
              url="https://unsplash.it/500/400/?image=634"
              {...props}
          />

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

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

      </div>
    )
  }
}

export default SelectableCardImage

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
playbook_ui-7.13.0.pre.alpha1 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_image.jsx
playbook_ui-7.13.0 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_image.jsx
playbook_ui-7.12.1 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_image.jsx
playbook_ui-7.12.0 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_image.jsx