diff options
Diffstat (limited to 'util/getThemeColor.ts')
-rw-r--r-- | util/getThemeColor.ts | 3 |
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) +} |