changed to new functions
All checks were successful
Deploy Docs to Synology / deploy (push) Successful in 3s
All checks were successful
Deploy Docs to Synology / deploy (push) Successful in 3s
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
// components/Label.js
|
||||
import { Tag } from "sigpro";
|
||||
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 Tag("label", { class: ui("floating-label", className), ...rest }, () => [
|
||||
return h("label", { class: ui("floating-label", className), ...rest }, () => [
|
||||
typeof children === 'function' ? children() : children,
|
||||
value ? Tag("span", {}, val(value)) : null
|
||||
value ? h("span", {}, val(value)) : null
|
||||
]);
|
||||
}
|
||||
|
||||
return Tag("label", { class: ui("label", className), ...rest }, () => [
|
||||
value ? Tag("span", { class: "label-text" }, 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
|
||||
]);
|
||||
};
|
||||
Reference in New Issue
Block a user