Sha256: 89e598775b8f6b4c236a32e644e5b19dad0c7646ec018d6605739866e1b9a48c

Contents?: true

Size: 976 Bytes

Versions: 3

Compression:

Stored size: 976 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 class="pb--doc-demo-row">

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

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

      </div>
    )
  }
}

export default SelectableCardBlock;

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
playbook_ui-3.1.0 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-3.0.1 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-3.0.0 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx