web_lib

Common web application libraries
git clone https://radroots.dev/git/web_lib.git
Log | Files | Refs | LICENSE

commit 66069a4f1e66fad740ca3260d36551800a22a89f
parent 46786e0033f70f8fda0ef21b92625370b3fdd5c0
Author: triesap <137732411+triesap@users.noreply.github.com>
Date:   Sun, 15 Sep 2024 15:29:14 +0000

themes: update utils

Diffstat:
Mthemes/.gitignore | 5+++--
Mthemes/src/utils.ts | 6+++---
2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/themes/.gitignore b/themes/.gitignore @@ -30,4 +30,5 @@ yarn-error.log* _tmp .vscode notes*.txt -justfile -\ No newline at end of file +justfile +git-diff.txt +\ No newline at end of file diff --git a/themes/src/utils.ts b/themes/src/utils.ts @@ -14,8 +14,8 @@ export const write_daisy = (obj_c: ThemeDaisy): Record<string, string> => Object export const parse_theme_key = (key?: string): ThemeKey => { switch (key) { - case "os": - case "earth": + case "os": + case "earth": return key; default: return "os"; @@ -32,7 +32,7 @@ export const parse_color_mode = (color_mode?: string): ColorMode => { }; }; -export const write_layers = ({ layer_0: { surface: l0_s, glyphs: l0_g }, layer_1: { surface: l1_s, glyphs: l1_g }, layer_2: { surface: l2_s, glyphs: l2_g } }: ThemeLayers): Record<string, string> => ({ +export const write_layers = ({ layer_0: { surface: l0_s, glyphs: l0_g }, layer_1: { surface: l1_s, glyphs: l1_g }, layer_2: { surface: l2_s, glyphs: l2_g }}: ThemeLayers): Record<string, string> => ({ "--layer-0-surface": hsl(l0_s._), "--layer-0-surface_a": hsl(l0_s._a), "--layer-0-surface-edge": hsl(l0_s.edge),