mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-23 21:38:44 +08:00
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:
@@ -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')}
|
||||
}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user