Sha256: 4c82348df808a5f27edf92fecc41b1ada2363b3ca78637f274c702c83d17d0cf

Contents?: true

Size: 1020 Bytes

Versions: 187

Compression:

Stored size: 1020 Bytes

Contents

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

class SelectableCardBlock extends React.Component {
  state = {
    block: true,
    tag: false,
  }

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

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

        <SelectableCard
            checked={this.state.block}
            inputId="block"
            name="block"
            onChange={this.handleSelect}
            value="block"
        >
          <Title
              size={4}
              text="Block"
          />
          <Body tag="span">{'This uses block'}</Body>
        </SelectableCard>

        <SelectableCard
            checked={this.state.tag}
            inputId="tag"
            name="tag"
            onChange={this.handleSelect}
            text="This passes text through the tag"
            value="tag"
        />

      </div>
    )
  }
}

export default SelectableCardBlock

Version data entries

187 entries across 187 versions & 1 rubygems

Version Path
playbook_ui-7.11.1 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-7.11.0 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-7.11.0.pre.alpha1 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-7.10.0 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-7.9.0 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-7.8.4 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-7.8.3 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-7.8.2 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-7.8.1 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-7.8.0 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-7.7.0.pre.alpha1 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-7.7.0 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-7.6.2.pre.alpha1 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-7.6.2 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-7.6.1.pre.alpha1 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-7.6.1 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-7.6.0 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-7.5.1 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-7.5.0 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-7.4.2 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx