From f302d2afab365ff6fc625539ed7d1ee945433e1f Mon Sep 17 00:00:00 2001 From: Seth Posner Date: Mon, 5 Dec 2022 16:46:34 -0800 Subject: [PATCH] Add text color option --- src/data/common.tsx | 3 ++- src/data/layers/paper.tsx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/data/common.tsx b/src/data/common.tsx index 65835ce..8d6d1f8 100644 --- a/src/data/common.tsx +++ b/src/data/common.tsx @@ -401,6 +401,7 @@ export function setUpDailyProgressTracker(options: { name: string, day: number, color: string, + textColor?: string, modal?: { show: Ref, display: VueFeature | CoercableComponent @@ -413,7 +414,7 @@ export function setUpDailyProgressTracker(options: { width: 600, height: 25, fillStyle: { backgroundColor: options.color }, - textStyle: { color: 'var(--feature-foreground)' }, + textStyle: options.textColor ? { color: options.textColor } : undefined, progress: () => main.day.value === options.day ? Decimal.div( diff --git a/src/data/layers/paper.tsx b/src/data/layers/paper.tsx index fae4131..ef07bb5 100644 --- a/src/data/layers/paper.tsx +++ b/src/data/layers/paper.tsx @@ -164,7 +164,8 @@ const layer = createLayer(id, function (this: BaseLayer) { goal: 5e3, name, day, - color + color, + textColor: 'var(--feature-foreground)' }); return {