Sha256: 7b48a34eda6a2173fddf4266baf75f108c146d5c6f2aa57b472572e021183306

Contents?: true

Size: 1.16 KB

Versions: 1644

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,644 entries across 1,644 versions & 2 rubygems

Version Path
playbook_ui_docs-14.6.2.pre.alpha.PBNTR667railstypeaheadformintegration4424 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-14.6.2.pre.alpha.PBNTR667railstypeaheadformintegration4424 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui_docs-14.7.0.pre.rc.17 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-14.7.0.pre.rc.17 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui_docs-14.7.0.pre.rc.16 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-14.7.0.pre.rc.16 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui_docs-14.7.0.pre.rc.15 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-14.7.0.pre.rc.15 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui_docs-14.7.0.pre.rc.14 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-14.7.0.pre.rc.14 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui_docs-14.7.0.pre.rc.13 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-14.7.0.pre.rc.13 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui_docs-14.6.2.pre.alpha.PBNTR666advancedtablefirstcolumn4406 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-14.6.2.pre.alpha.PBNTR666advancedtablefirstcolumn4406 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
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