From 5ee89ec8f6e3326fa9b57a5534032b504d4af95b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Zi=C3=B3=C5=82kowski?= Date: Fri, 22 Nov 2024 16:43:01 +0100 Subject: [PATCH] Update TestInfo.tsx --- testing/testing-components/src/components/TestInfo.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/testing-components/src/components/TestInfo.tsx b/testing/testing-components/src/components/TestInfo.tsx index c07a803..370b8aa 100644 --- a/testing/testing-components/src/components/TestInfo.tsx +++ b/testing/testing-components/src/components/TestInfo.tsx @@ -4,8 +4,8 @@ import * as Localization from 'expo-localization'; import { useColorScheme } from 'react-native'; import { InfoItem } from './InfoItem'; -const getContrastTextColor = (backgroundColor: string = '') => { - if (!backgroundColor) return '#000000'; +const getContrastTextColor = (backgroundColor: string | undefined) => { + if (!backgroundColor) return undefined; const hex = backgroundColor.replace('#', ''); const r = parseInt(hex.substr(0, 2), 16) / 255;