import { RadioGroup } from "@kobalte/core"; import { For, Show } from "solid-js"; type Choices = { value: string, label: string, caption: string }[] // TODO: how could would it be if we could just pass the estimated fees in here? export function StyledRadioGroup(props: { value: string, choices: Choices, onValueChange: (value: string) => void, small?: boolean, red?: boolean }) { return ( // TODO: rewrite this with CVA, props are bad for tailwind props.onValueChange(e)} class={`grid w-full gap-${props.small ? "2" : "4"} grid-cols-${props.choices.length.toString()}`}> {choice =>
{choice.label}
{choice.caption}
}
) }