Zoom, better sizes, color picker, sidebar footer

This commit is contained in:
Gregory Schier
2023-03-08 19:22:04 -08:00
parent c37cfaf0e4
commit 6c8f4c943a
26 changed files with 424 additions and 239 deletions

View File

@@ -28,7 +28,7 @@ const lightTheme: AppTheme = {
appearance: 'light',
layers: {
root: {
whitePoint: 0.98,
whitePoint: 0.95,
colors: {
gray: '#7f8fb0',
red: '#da4545',
@@ -59,9 +59,15 @@ export function toggleAppearance(): Appearance {
return newAppearance;
}
export function setAppearance(a?: Appearance) {
export function setAppearance(a?: Appearance, gray?: string) {
const appearance = a ?? getPreferredAppearance();
const theme = appearance === 'dark' ? darkTheme : lightTheme;
// Hack to update the gray color for a demo
if (theme.layers.root && gray) {
theme.layers.root.colors.gray = gray;
}
document.documentElement.setAttribute('data-appearance', appearance);
document.documentElement.setAttribute('data-theme', theme.name);