Skip to content

armgit / bento

Public Imported from GitHub
0

Bento, the office suite that fits in a file

v0.3.1: shadow color control — recolor any shadow/glow from the panel

nyblnetf838784e4848
diff --git a/slides/package.json b/slides/package.json
index 8e1eb992..24193b48 100644
--- a/slides/package.json
+++ b/slides/package.json
@@ -1,7 +1,7 @@
{
"name": "bento-slides",
"private": true,
- "version": "0.3.0",
+ "version": "0.3.1",
"type": "module",
"scripts": {
"dev": "vite",
diff --git a/slides/src/editor/panels.ts b/slides/src/editor/panels.ts
index 146db2e5..2e2f1ce3 100644
--- a/slides/src/editor/panels.ts
+++ b/slides/src/editor/panels.ts
@@ -275,6 +275,11 @@ export class PropsPanel {
if (v === 'none') delete e.shadow
else if (v !== 'custom') e.shadow = { ...SHADOW_PRESETS[v] }
}, true)))
+ if (el.shadow) {
+ // recoloring a preset makes it 'custom' on next rebuild — that's fine
+ this.row('Shadow color', this.colorAlpha(el.shadow.color, (v, fin) =>
+ this.mutate(el.id, (e) => { if (e.shadow) e.shadow = { ...e.shadow, color: v } }, fin)))
+ }
if (el.type === 'text') this.buildTextProps(el)