@bouko/react 1.8.1 → 1.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/components/field.js
CHANGED
|
@@ -5,6 +5,6 @@ export default function Field({ style, label, required = true, note, children })
|
|
|
5
5
|
}
|
|
6
6
|
const styles = {
|
|
7
7
|
container: "flex flex-col shrink-0 gap-1 w-full overflow-hidden",
|
|
8
|
-
label: "text-xs text-
|
|
8
|
+
label: "text-xs text-primary-dark",
|
|
9
9
|
note: "mt-1 text-xs text-slate-500 whitespace-pre-line"
|
|
10
10
|
};
|
|
@@ -22,7 +22,7 @@ export function FormBuilder({ fields, validator, data, styles, update, submit, c
|
|
|
22
22
|
await submit.action(data);
|
|
23
23
|
setLoading(false);
|
|
24
24
|
};
|
|
25
|
-
return (_jsxs("div", { className: "flex flex-col w-full gap-4", children: [fields.map((row, i) => (_jsx(RowBox, { style: "w-full gap-5 overflow-hidden", children: row.map(({ element, id, rows, label, placeholder, options, required, note }) => {
|
|
25
|
+
return (_jsxs("div", { className: cn("flex flex-col w-full gap-4", styles?.container), children: [fields.map((row, i) => (_jsx(RowBox, { style: "w-full gap-5 overflow-hidden", children: row.map(({ element, id, rows, label, placeholder, options, required, note }) => {
|
|
26
26
|
if (element === "input")
|
|
27
27
|
return (_jsx(Input, { id: id, styles: { container: "flex-1" }, label: label, placeholder: placeholder, value: data[id], update: update, note: note, required: required }, id));
|
|
28
28
|
else if (element === "select")
|
|
@@ -10,7 +10,7 @@ const styles = tv({
|
|
|
10
10
|
color: {
|
|
11
11
|
accent: "bg-accent/20 border-accent-dark text-accent-dark",
|
|
12
12
|
orange: "bg-orange-400/20 border-orange-500 text-orange-500",
|
|
13
|
-
dark: "bg-slate-
|
|
13
|
+
dark: "bg-slate-600/20 border-slate-700 text-slate-700"
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
});
|