-
-
Notifications
You must be signed in to change notification settings - Fork 427
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(blocks): remove lit dependency from theme service
- Loading branch information
Showing
5 changed files
with
40 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { | ||
type AffineCssVariables, | ||
combinedDarkCssVariables, | ||
combinedLightCssVariables, | ||
} from '@toeverything/theme'; | ||
import { unsafeCSS } from 'lit'; | ||
|
||
const toolbarColorKeys: Array<keyof AffineCssVariables> = [ | ||
'--affine-background-overlay-panel-color', | ||
'--affine-v2-layer-background-overlayPanel' as never, | ||
'--affine-background-error-color', | ||
'--affine-background-primary-color', | ||
'--affine-background-tertiary-color', | ||
'--affine-icon-color', | ||
'--affine-icon-secondary', | ||
'--affine-border-color', | ||
'--affine-divider-color', | ||
'--affine-text-primary-color', | ||
'--affine-hover-color', | ||
'--affine-hover-color-filled', | ||
]; | ||
|
||
export const lightToolbarStyles = toolbarColorKeys.map( | ||
key => `${key}: ${unsafeCSS(combinedLightCssVariables[key])};` | ||
); | ||
|
||
export const darkToolbarStyles = toolbarColorKeys.map( | ||
key => `${key}: ${unsafeCSS(combinedDarkCssVariables[key])};` | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
packages/blocks/src/root-block/edgeless/components/toolbar/template/template-panel.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters