summaryrefslogtreecommitdiff
path: root/util/getThemeColor.ts
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2022-09-27 15:09:17 +0200
committerThomas F. K. Jorna <[email protected]>2022-09-27 15:09:17 +0200
commita575d14b6621d5464d33d52ca642f2db70c3e370 (patch)
tree5a1d38227a93b1bf2b152ed4af5820a59c34cf91 /util/getThemeColor.ts
parentfa84c052b221d157fa869cd4912acd538b5005a0 (diff)
fix: move a ton of functions to separate files
Diffstat (limited to 'util/getThemeColor.ts')
-rw-r--r--util/getThemeColor.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/util/getThemeColor.ts b/util/getThemeColor.ts
new file mode 100644
index 0000000..1175a52
--- /dev/null
+++ b/util/getThemeColor.ts
@@ -0,0 +1,3 @@
+export const getThemeColor = (name: string, theme: any) => {
+ return name.split('.').reduce((o, i) => o[i], theme.colors)
+}