fix(editor): should keep color on custom color button (#11773)

Closes: [BS-3167](https://linear.app/affine-design/issue/BS-3167/自定义按钮显示错误)
This commit is contained in:
fundon
2025-04-17 12:21:39 +00:00
parent 8dc21e53ca
commit a46bb446e2
5 changed files with 129 additions and 7 deletions

View File

@@ -321,7 +321,7 @@ export const calcCustomButtonStyle = (
return { '--b': b, '--c': c };
}
if (color.startsWith('---')) {
if (color.startsWith('--')) {
if (!color.endsWith('transparent')) {
b = 'var(--affine-background-overlay-panel-color)';
c = keepColor(