Sha256: 64797e42e88d0c2d2a08fa97898fbf8cdf90bcb9c6ece4a3335dd1c3f4a793e5
Contents?: true
Size: 1.72 KB
Versions: 4
Compression:
Stored size: 1.72 KB
Contents
import React from 'react' import SelectableCard from '../_selectable_card.jsx' class SelectableCardDefault extends React.Component { state = { selectedWithIcon: true, selectedWithoutIcon: true, unselected: false, } handleSelect = (event) => { this.setState({ [event.target.id]: event.target.checked, }) } render(props) { return ( <div className="pb--doc-demo-row"> <SelectableCard checked={this.state.selectedWithIcon} icon inputId="selectedWithIcon" name="selectedWithIcon" onChange={this.handleSelect} value="selectedWithIcon" {...props} > {'Selected, with icon'} </SelectableCard> <SelectableCard checked={this.state.selectedWithoutIcon} icon={false} inputId="selectedWithoutIcon" name="selectedWithoutIcon" onChange={this.handleSelect} value="selectedWithoutIcon" {...props} > {'Selected, without icon'} </SelectableCard> <SelectableCard checked={this.state.unselected} inputId="unselected" name="unselected" onChange={this.handleSelect} value="unselected" {...props} > {'Unselected'} </SelectableCard> <SelectableCard checked={this.state.disabled} disabled inputId="disabled" name="disabled" onChange={this.handleSelect} value="disabled" {...props} > {'Disabled'} </SelectableCard> </div> ) } } export default SelectableCardDefault
Version data entries
4 entries across 4 versions & 1 rubygems