import style from "./style.module.scss"; import {ChangeEvent} from "rollup"; import {JSX} from "preact"; export function Radio>(props: { name: string, choices: Choices, value: keyof Choices, onChoose: (choice: keyof Choices) => void, }) { let buttons = []; for (const [key, value] of Object.entries(props.choices)) { console.log(props.value) buttons.push(
{ props.onChoose(key); }} />
) } return (
{buttons}
); }