Sha256: 7b48a34eda6a2173fddf4266baf75f108c146d5c6f2aa57b472572e021183306

Contents?: true

Size: 1.16 KB

Versions: 1650

Compression:

Stored size: 1.16 KB

Contents

import React, { useState } from 'react'

import SelectableCard from '../_selectable_card'

import Body from '../../pb_body/_body'
import Title from '../../pb_title/_title'

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

1,650 entries across 1,650 versions & 2 rubygems

Version Path
playbook_ui_docs-14.7.0.pre.rc.12 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-14.7.0.pre.rc.12 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui_docs-14.6.2.pre.alpha.PLAY15814384 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-14.6.2.pre.alpha.PLAY15814384 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui_docs-14.6.2.pre.alpha.PBNTR633dropdownavailablepropstable4380 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-14.6.2.pre.alpha.PBNTR633dropdownavailablepropstable4380 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui_docs-14.7.0.pre.rc.11 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-14.7.0.pre.rc.11 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui_docs-14.7.0.pre.rc.10 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-14.7.0.pre.rc.10 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui_docs-14.6.2.pre.alpha.PLAY1551tiptapextbump4350 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-14.6.2.pre.alpha.PLAY1551tiptapextbump4350 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui_docs-14.6.2.pre.alpha.PLAY15814348 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-14.6.2.pre.alpha.PLAY15814348 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui_docs-14.7.0.pre.rc.9 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-14.7.0.pre.rc.9 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui_docs-14.7.0.pre.rc.8 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-14.7.0.pre.rc.8 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui_docs-14.6.2.pre.alpha.PBNTR633dropdownavailablepropstable4316 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-14.6.2.pre.alpha.PBNTR633dropdownavailablepropstable4316 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx