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