Use custom theme color for radio buttons

This commit is contained in:
Brandon Presley 2022-10-14 17:06:23 +13:00
parent c4e26e2560
commit 2782d34a05
1 changed files with 3 additions and 0 deletions

View File

@ -8,6 +8,7 @@ import React, {useCallback, useContext, useMemo, useRef, useState} from 'react';
import {NativeModules, TextInput, View} from 'react-native';
import {FlatList} from 'react-native-gesture-handler';
import {Button, IconButton, List, RadioButton} from 'react-native-paper';
import {CustomTheme} from './App';
import {getBestSet} from './best.service';
import {PADDING} from './constants';
import CountMany from './count-many';
@ -36,6 +37,7 @@ export default function StartPlan() {
const unitRef = useRef<TextInput>(null);
const navigation = useNavigation();
const workouts = useMemo(() => params.plan.workouts.split(','), [params]);
const {color} = useContext(CustomTheme);
const [selection, setSelection] = useState({
start: 0,
@ -152,6 +154,7 @@ export default function StartPlan() {
<RadioButton
value={index.toString()}
status={selected === index ? 'checked' : 'unchecked'}
color={color}
/>
</View>
)}