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.8.0.pre.alpha.PLAY1649rolloutheightglobalprops4635 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-14.8.0.pre.alpha.PLAY1649rolloutheightglobalprops4635 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui_docs-14.9.0.pre.rc.8 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-14.9.0.pre.rc.8 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui_docs-14.8.0.pre.alpha.PLAY1598floatinguiupgrade4617 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-14.8.0.pre.alpha.PLAY1598floatinguiupgrade4617 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui_docs-14.9.0.pre.rc.7 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-14.9.0.pre.rc.7 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui_docs-14.9.0.pre.rc.6 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-14.9.0.pre.rc.6 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui_docs-14.9.0.pre.rc.5 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-14.9.0.pre.rc.5 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui_docs-14.8.0.pre.alpha.pbntr661createstickyleftprop4612 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-14.8.0.pre.alpha.pbntr661createstickyleftprop4612 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui_docs-14.8.0.pre.alpha.play1648heightglobalprops4606 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-14.8.0.pre.alpha.play1648heightglobalprops4606 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui_docs-14.9.0.pre.rc.4 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-14.9.0.pre.rc.4 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui_docs-14.9.0.pre.rc.3 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx
playbook_ui-14.9.0.pre.rc.3 app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx