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