From a1440b680f5e9a01625c453407b3173568720735 Mon Sep 17 00:00:00 2001 From: Brandon Presley Date: Thu, 15 Dec 2022 16:43:00 +1300 Subject: [PATCH] Fix ripple color for dark theme --- PlanItem.tsx | 5 +++-- SetItem.tsx | 5 +++-- constants.ts | 2 ++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/PlanItem.tsx b/PlanItem.tsx index 4e35d61..4881b20 100644 --- a/PlanItem.tsx +++ b/PlanItem.tsx @@ -7,6 +7,7 @@ import {useCallback, useMemo, useState} from 'react' import {Text} from 'react-native' import {List} from 'react-native-paper' import {getBestSet} from './best.service' +import {DARK_RIPPLE, LIGHT_RIPPLE} from './constants' import {defaultSet} from './gym-set' import {Plan} from './plan' import {PlanPageParams} from './plan-page-params' @@ -75,8 +76,8 @@ export default function PlanItem({ const backgroundColor = useMemo(() => { if (!ids.includes(item.id)) return - if (dark) return '#c2c2c2' - return '#c2c2c2' + if (dark) return DARK_RIPPLE + return LIGHT_RIPPLE }, [dark, ids, item.id]) return ( diff --git a/SetItem.tsx b/SetItem.tsx index fa785af..5a84ec2 100644 --- a/SetItem.tsx +++ b/SetItem.tsx @@ -3,6 +3,7 @@ import {format} from 'date-fns' import {useCallback, useMemo} from 'react' import {Image} from 'react-native' import {List, Text} from 'react-native-paper' +import {DARK_RIPPLE, LIGHT_RIPPLE} from './constants' import GymSet from './gym-set' import {HomePageParams} from './home-page-params' import Settings from './settings' @@ -37,8 +38,8 @@ export default function SetItem({ const backgroundColor = useMemo(() => { if (!ids.includes(item.id)) return - if (dark) return '#c2c2c2' - return '#c2c2c2' + if (dark) return DARK_RIPPLE + return LIGHT_RIPPLE }, [dark, ids, item.id]) return ( diff --git a/constants.ts b/constants.ts index 265aad6..7471ca1 100644 --- a/constants.ts +++ b/constants.ts @@ -1,3 +1,5 @@ export const MARGIN = 10 export const PADDING = 10 export const ITEM_PADDING = 8 +export const DARK_RIPPLE = '#444444' +export const LIGHT_RIPPLE = '#c2c2c2'