Skip to content

Commit 68221e7

Browse files
committed
descriptions: fix background and add remove command
1 parent d20e733 commit 68221e7

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

lib/com/description.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,20 @@ export class Description {
3030
ctx.node.changed();
3131
}
3232
});
33+
workbench.commands.registerCommand({
34+
id: "remove-description",
35+
title: "Remove Description",
36+
when: (ctx: Context) => {
37+
if (!ctx.node) return false;
38+
if (ctx.path.previous && objectManaged(ctx.path.previous)) return false;
39+
if (ctx.node.hasComponent(Description)) return true;
40+
return false;
41+
},
42+
action: (ctx: Context, name: string) => {
43+
ctx.node.removeComponent(Description);
44+
ctx.node.changed();
45+
}
46+
});
3347
}
3448
}
3549

web/static/app/main.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ with their icon for Safari only*/
244244
font-size: 13px;
245245
border: 0;
246246
outline: 0;
247+
background: transparent;
247248
}
248249
/*todo: check unused textarea styles in panel.tsx*/
249250
.text-editor > textarea, .text-editor > span {

0 commit comments

Comments
 (0)