Skip to content

Commit 81d6452

Browse files
committed
feat: add Comment attribute
1 parent 4456f85 commit 81d6452

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

apps/builder/app/canvas/canvas.tsx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,22 @@ export const Canvas = () => {
236236
registerComponentLibrary({
237237
components: baseComponents,
238238
metas: baseComponentMetas,
239-
propsMetas: baseComponentPropsMetas,
239+
propsMetas: Object.fromEntries(
240+
Object.entries(baseComponentPropsMetas).map(
241+
([component, propsMeta]) => {
242+
propsMeta.props.comment = {
243+
type: "string",
244+
control: "text",
245+
required: false,
246+
description:
247+
"Describe the behavior of this layer and optionally its children.",
248+
};
249+
propsMeta.initialProps ??= [];
250+
propsMeta.initialProps.push("comment");
251+
return [component, propsMeta];
252+
}
253+
)
254+
),
240255
hooks: baseComponentHooks,
241256
templates: baseComponentTemplates,
242257
});

0 commit comments

Comments
 (0)