import { Switch as Kobalte } from "@kobalte/core/switch" import { children, Show, splitProps } from "solid-js" import type { ComponentProps, ParentProps } from "solid-js" export interface SwitchProps extends ParentProps> { hideLabel?: boolean description?: string } export function Switch(props: SwitchProps) { const [local, others] = splitProps(props, ["children", "class", "hideLabel", "description"]) const resolved = children(() => local.children) return ( {resolved()} {local.description} ) }