Skip to content

Commit

Permalink
Update TestInfo.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
michalziolkowski committed Nov 22, 2024
1 parent e7d68e7 commit 5ee89ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions testing/testing-components/src/components/TestInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5ee89ec

Please sign in to comment.