feat(editor): inner toolbar layout for block (#11243)

Close [BS-2808](https://linear.app/affine-design/issue/BS-2808/组件内-toolbar-重构)
This commit is contained in:
L-Sun
2025-03-28 03:47:37 +00:00
parent 7193393a06
commit e2c752d56f
8 changed files with 150 additions and 62 deletions
@@ -21,10 +21,18 @@ const toolbarColorKeys: Array<keyof AffineCssVariables> = [
'--affine-hover-color-filled',
];
export const lightToolbarStyles = toolbarColorKeys.map(
key => `${key}: ${unsafeCSS(combinedLightCssVariables[key])};`
);
export const lightToolbarStyles = (selector: string) => `
${selector}[data-app-theme='light'] {
${toolbarColorKeys
.map(key => `${key}: ${unsafeCSS(combinedLightCssVariables[key])};`)
.join('\n')}
}
`;
export const darkToolbarStyles = toolbarColorKeys.map(
key => `${key}: ${unsafeCSS(combinedDarkCssVariables[key])};`
);
export const darkToolbarStyles = (selector: string) => `
${selector}[data-app-theme='dark'] {
${toolbarColorKeys
.map(key => `${key}: ${unsafeCSS(combinedDarkCssVariables[key])};`)
.join('\n')}
}
`;