Sha256: 8c194b4449c08b4af7bc0f13daf307595c50d8b88a6f91385093693efcba0539
Contents?: true
Size: 1.26 KB
Versions: 187
Compression:
Stored size: 1.26 KB
Contents
import React from 'react' import SelectableCard from '../_selectable_card.jsx' class SelectableCardSingleSelect extends React.Component { state = { selected: null, } handleSelect = (event) => { this.setState({ selected: event.target.value, }) } render() { return ( <div className="pb--doc-demo-row"> <SelectableCard checked={this.state.selected === 'male'} inputId="male1" multi={false} name="gender" onChange={this.handleSelect.bind(this)} value="male" > {'Male'} </SelectableCard> <SelectableCard checked={this.state.selected === 'female'} inputId="female1" multi={false} name="gender" onChange={this.handleSelect.bind(this)} value="female" > {'Female'} </SelectableCard> <SelectableCard checked={this.state.selected === 'other'} inputId="other1" multi={false} name="gender" onChange={this.handleSelect.bind(this)} value="other" > {'Other'} </SelectableCard> </div> ) } } export default SelectableCardSingleSelect
Version data entries
187 entries across 187 versions & 1 rubygems