MCPcopy Create free account
hub / github.com/reactstrap/reactstrap / render

Method render

types/reactstrap-tests.tsx:403–459  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

401 }
402
403 render() {
404 return (
405 <div>
406 <h5>Radio Buttons</h5>
407 <ButtonGroup>
408 <Button
409 color="primary"
410 onClick={() => this.onRadioBtnClick(1)}
411 active={this.state.rSelected === 1}
412 >
413 One
414 </Button>
415 <Button
416 color="primary"
417 onClick={() => this.onRadioBtnClick(2)}
418 active={this.state.rSelected === 2}
419 >
420 Two
421 </Button>
422 <Button
423 color="primary"
424 onClick={() => this.onRadioBtnClick(3)}
425 active={this.state.rSelected === 3}
426 >
427 Three
428 </Button>
429 </ButtonGroup>
430 <p>Selected: {this.state.rSelected}</p>
431
432 <h5>Checkbox Buttons</h5>
433 <ButtonGroup>
434 <Button
435 color="primary"
436 onClick={() => this.onCheckboxBtnClick(1)}
437 active={this.state.cSelected.includes(1)}
438 >
439 One
440 </Button>
441 <Button
442 color="primary"
443 onClick={() => this.onCheckboxBtnClick(2)}
444 active={this.state.cSelected.includes(2)}
445 >
446 Two
447 </Button>
448 <Button
449 color="primary"
450 onClick={() => this.onCheckboxBtnClick(3)}
451 active={this.state.cSelected.includes(3)}
452 >
453 Three
454 </Button>
455 </ButtonGroup>
456 <p>Selected: {JSON.stringify(this.state.cSelected)}</p>
457 </div>
458 );
459 }
460}

Callers

nothing calls this directly

Calls 2

onRadioBtnClickMethod · 0.95
onCheckboxBtnClickMethod · 0.95

Tested by

no test coverage detected