Use custom theme color for radio buttons
This commit is contained in:
parent
c4e26e2560
commit
2782d34a05
|
@ -8,6 +8,7 @@ import React, {useCallback, useContext, useMemo, useRef, useState} from 'react';
|
||||||
import {NativeModules, TextInput, View} from 'react-native';
|
import {NativeModules, TextInput, View} from 'react-native';
|
||||||
import {FlatList} from 'react-native-gesture-handler';
|
import {FlatList} from 'react-native-gesture-handler';
|
||||||
import {Button, IconButton, List, RadioButton} from 'react-native-paper';
|
import {Button, IconButton, List, RadioButton} from 'react-native-paper';
|
||||||
|
import {CustomTheme} from './App';
|
||||||
import {getBestSet} from './best.service';
|
import {getBestSet} from './best.service';
|
||||||
import {PADDING} from './constants';
|
import {PADDING} from './constants';
|
||||||
import CountMany from './count-many';
|
import CountMany from './count-many';
|
||||||
|
@ -36,6 +37,7 @@ export default function StartPlan() {
|
||||||
const unitRef = useRef<TextInput>(null);
|
const unitRef = useRef<TextInput>(null);
|
||||||
const navigation = useNavigation();
|
const navigation = useNavigation();
|
||||||
const workouts = useMemo(() => params.plan.workouts.split(','), [params]);
|
const workouts = useMemo(() => params.plan.workouts.split(','), [params]);
|
||||||
|
const {color} = useContext(CustomTheme);
|
||||||
|
|
||||||
const [selection, setSelection] = useState({
|
const [selection, setSelection] = useState({
|
||||||
start: 0,
|
start: 0,
|
||||||
|
@ -152,6 +154,7 @@ export default function StartPlan() {
|
||||||
<RadioButton
|
<RadioButton
|
||||||
value={index.toString()}
|
value={index.toString()}
|
||||||
status={selected === index ? 'checked' : 'unchecked'}
|
status={selected === index ? 'checked' : 'unchecked'}
|
||||||
|
color={color}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user