fui-fancyui
Version:
FancyUI Libary
42 lines (41 loc) • 1.31 kB
JavaScript
"use client";
import { jsx as e, Fragment as u, jsxs as o } from "react/jsx-runtime";
import { useId as g } from "react";
import i from "../FancyContent/FancyContent.js";
import { LabelWrapper as x, InputWrapper as I } from "./FancySelectWrapper.style.js";
function $(t) {
const {
label: n,
align: c = "center",
alignInput: d = "left",
description: r,
inputElement: l,
externalStyle: p,
themeType: a = "secondary",
layerDescription: m = 2,
layer: s = 0,
...h
} = t, y = g(), f = t.id ? t.id : y;
return /* @__PURE__ */ e(u, { children: n || r ? /* @__PURE__ */ o(x, { $align: c, htmlFor: f, $externalStyle: p, ...h, children: [
/* @__PURE__ */ o(i, { layoutMode: "normal", children: [
n && /* @__PURE__ */ e(i.Title, { fontVariant: "interactiveLg", themeType: a, layer: s, fontWeight: "bold", children: n }),
r && /* @__PURE__ */ e(
i.Description,
{
className: "description",
fontVariant: "bodytextSm",
themeType: a,
layer: m,
children: r
}
)
] }),
/* @__PURE__ */ e(I, { $alignInput: d, children: l })
] }) : (
/* Render just the input element when no label/description */
/* @__PURE__ */ e("div", { children: l })
) });
}
export {
$ as default
};