@anoki/fse-ui
Version:
FSE UI components library
50 lines (49 loc) • 1.39 kB
JavaScript
import { j as r } from "./index.es180.js";
import './components/ui/Search/Search.css';/* empty css */
import { clsx as e } from "./index.es182.js";
import { useState as m } from "react";
import { useAlertDialog as p } from "./index.es196.js";
import { Button as x } from "./index.es25.js";
const v = ({
btnText: i,
helperText: l,
onChangeValue: t,
value: o
}) => {
const [s, c] = m(o), { openAlert: n, AlertDialog: u } = p();
return /* @__PURE__ */ r.jsxs("div", { className: e("ui-search", "br-x4 bg-border-secondary w-full"), children: [
/* @__PURE__ */ r.jsx(
"input",
{
id: "search",
type: "search",
className: e(
"ui-search-input",
"bg-white fs-6 text-slate-20 br-x4 w-full pl-x24"
),
placeholder: l,
"aria-label": "Barra di ricerca",
value: s,
onChange: (a) => {
t && t(a.target.value), c(a.target.value);
}
}
),
/* @__PURE__ */ r.jsx("div", { className: e("ui-div-btn"), children: /* @__PURE__ */ r.jsx(
x,
{
className: e(
"ui-btn-search",
"bg-primary text-white fs-7 fw-semibold br-x4"
),
onClick: () => n({ description: s }),
children: i
}
) }),
/* @__PURE__ */ r.jsx(u, {})
] });
};
export {
v as Search
};
//# sourceMappingURL=index.es11.js.map