Add text color option

This commit is contained in:
Seth Posner 2022-12-05 16:46:34 -08:00
parent ee48800c37
commit f302d2afab
2 changed files with 4 additions and 2 deletions

View file

@ -401,6 +401,7 @@ export function setUpDailyProgressTracker(options: {
name: string, name: string,
day: number, day: number,
color: string, color: string,
textColor?: string,
modal?: { modal?: {
show: Ref<boolean>, show: Ref<boolean>,
display: VueFeature | CoercableComponent display: VueFeature | CoercableComponent
@ -413,7 +414,7 @@ export function setUpDailyProgressTracker(options: {
width: 600, width: 600,
height: 25, height: 25,
fillStyle: { backgroundColor: options.color }, fillStyle: { backgroundColor: options.color },
textStyle: { color: 'var(--feature-foreground)' }, textStyle: options.textColor ? { color: options.textColor } : undefined,
progress: () => progress: () =>
main.day.value === options.day main.day.value === options.day
? Decimal.div( ? Decimal.div(

View file

@ -164,7 +164,8 @@ const layer = createLayer(id, function (this: BaseLayer) {
goal: 5e3, goal: 5e3,
name, name,
day, day,
color color,
textColor: 'var(--feature-foreground)'
}); });
return { return {