import React, { useState } from "react"; import { RadioButtonGroup } from "../../../"; import { IRadioButtonProps } from "../radio-button.d"; const ControlledRadioButton = () => { const [selected, setSelected] = useState(); const buttons: IRadioButtonProps[] = [1, 2, 3, 4, 5].map(i => { return { name: `Button${i}`, label: `Button ${i}`, value: `${i}` }; }); buttons.push({ name: `Button_number`, label: `Button number`, value: 6 }); buttons.push({ name: `Button_false`, label: `Button_false`, value: false }); buttons.push({ name: `Button_true`, label: `Button_true`, value: true }); return ( <>
Selection: {String(selected)}