// components/Label.js import { h } from "sigpro"; import { ui, val } from "../utils.js"; export const Label = (props) => { const { children, value, floating = false, class: className, ...rest } = props; if (floating) { return h("label", { class: ui("floating-label", className), ...rest }, () => [ typeof children === 'function' ? children() : children, value ? h("span", {}, val(value)) : null ]); } return h("label", { class: ui("label", className), ...rest }, () => [ value ? h("span", { class: "label-text" }, val(value)) : null, typeof children === 'function' ? children() : children ]); };