Sha256: c76708d1ce9b88b193f0e6ed1dc838af4e95b14fbcf793fd0afc49de7ec06213

Contents?: true

Size: 1.09 KB

Versions: 90

Compression:

Stored size: 1.09 KB

Contents

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

const SelectableCardBlock = (props) => {
  const [block, setBlock] = useState(true)
  const [tag, setTag] = useState(false)

  const handleSelect = (event) => {
    setBlock(event.target.checked)
  }

  const handleTag = (event) => {
    setTag(event.target.checked)
  }

  return (
    <div className="pb--doc-demo-row">
      <SelectableCard
          checked={block}
          inputId="block"
          name="block"
          onChange={handleSelect}
          value="block"
          {...props}
      >
        <Title
            size={4}
            text="Block"
            {...props}
        />
        <Body
            tag="span"
            {...props}
        >
          {'This uses block'}
        </Body>
      </SelectableCard>

      <SelectableCard
          checked={tag}
          inputId="tag"
          name="tag"
          onChange={handleTag}
          text="This passes text through the tag"
          value="tag"
          {...props}
      />
    </div>
  )
}

export default SelectableCardBlock

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_block.jsx
playbook_ui-9.3.0.alpha.inline1 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-9.3.0.pre.alpha.password.strength.1 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-9.3.0 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-9.2.2.pre.alpha.margin app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-9.2.2 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-9.2.1 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-9.2.0 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-9.1.0 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-9.0.0 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-8.3.0.alpha.select.pre.margin app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-8.3.0 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-8.2.1.pre.alpha5 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-8.2.1.pre.alpha4 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-8.2.1.alpha.iconacc app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-8.2.1.pre.alpha3 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-8.2.1.pre.alpha2 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-8.3.0.deps2 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-8.3.0.pre.alpha1 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-8.2.1.pre.alpha1 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx