@raketa-builder/menu-builder 0.4.0 → 0.5.0
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/index.js +15 -0
- package/package.json +1 -1
- package/src/MenuBuilder/Factories.js +1 -0
- package/src/MenuBuilder/ItemForm.js +16 -0
package/dist/index.js
CHANGED
|
@@ -1118,6 +1118,7 @@ var Factories = {
|
|
|
1118
1118
|
item: () => ({
|
|
1119
1119
|
id: rand(4),
|
|
1120
1120
|
html_id: "",
|
|
1121
|
+
class_name: "",
|
|
1121
1122
|
label: "New item",
|
|
1122
1123
|
url: "#",
|
|
1123
1124
|
target: "",
|
|
@@ -1261,6 +1262,20 @@ var ItemForm = ({ item, onChange, onRemove, onDuplicate }) => /* @__PURE__ */ (0
|
|
|
1261
1262
|
}
|
|
1262
1263
|
)
|
|
1263
1264
|
] }),
|
|
1265
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ui2.FormGroup, { children: [
|
|
1266
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ui2.Label, { htmlFor: "class_name", children: "CSS class" }),
|
|
1267
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1268
|
+
import_ui2.Input,
|
|
1269
|
+
{
|
|
1270
|
+
name: "class_name",
|
|
1271
|
+
type: "text",
|
|
1272
|
+
value: item.class_name,
|
|
1273
|
+
onChange: (e) => onChange(__spreadProps(__spreadValues({}, item), {
|
|
1274
|
+
class_name: e.target.value
|
|
1275
|
+
}))
|
|
1276
|
+
}
|
|
1277
|
+
)
|
|
1278
|
+
] }),
|
|
1264
1279
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ui2.FormGroup, { children: [
|
|
1265
1280
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ui2.Label, { htmlFor: "target", children: "Target" }),
|
|
1266
1281
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
package/package.json
CHANGED
|
@@ -62,6 +62,22 @@ const ItemForm = ({ item, onChange, onRemove, onDuplicate }) => (
|
|
|
62
62
|
/>
|
|
63
63
|
</FormGroup>
|
|
64
64
|
|
|
65
|
+
<FormGroup>
|
|
66
|
+
<Label htmlFor="class_name">CSS class</Label>
|
|
67
|
+
|
|
68
|
+
<Input
|
|
69
|
+
name="class_name"
|
|
70
|
+
type="text"
|
|
71
|
+
value={item.class_name}
|
|
72
|
+
onChange={(e) =>
|
|
73
|
+
onChange({
|
|
74
|
+
...item,
|
|
75
|
+
class_name: e.target.value,
|
|
76
|
+
})
|
|
77
|
+
}
|
|
78
|
+
/>
|
|
79
|
+
</FormGroup>
|
|
80
|
+
|
|
65
81
|
<FormGroup>
|
|
66
82
|
<Label htmlFor="target">Target</Label>
|
|
67
83
|
|