1
1
/* @flow strict-local */
2
- import React , { useCallback , useRef , useMemo , useEffect } from 'react' ;
2
+ import React , { useCallback , useRef , useMemo , useEffect , useContext } from 'react' ;
3
3
import type { Node } from 'react' ;
4
4
import { View } from 'react-native' ;
5
5
import invariant from 'invariant' ;
@@ -8,11 +8,12 @@ import { CommonActions } from '@react-navigation/native';
8
8
import type { LocalizableText } from '../types' ;
9
9
import type { GlobalParamList } from '../nav/globalTypes' ;
10
10
import { randString } from '../utils/misc' ;
11
- import { BRAND_COLOR , createStyleSheet } from '../styles' ;
11
+ import { createStyleSheet } from '../styles' ;
12
12
import Touchable from './Touchable' ;
13
13
import ZulipTextIntl from './ZulipTextIntl' ;
14
14
import { IconRight } from './Icons' ;
15
15
import type { AppNavigationMethods } from '../nav/AppNavigator' ;
16
+ import { ThemeContext } from '../styles/theme' ;
16
17
17
18
type Item < TKey > = $ReadOnly < { |
18
19
key : TKey ,
@@ -128,6 +129,7 @@ export default function InputRowRadioButtons<TItemKey: string>(props: Props<TIte
128
129
// It'll also be its width.
129
130
const kRightArrowIconSize = 24 ;
130
131
132
+ const themeData = useContext ( ThemeContext ) ;
131
133
const styles = useMemo (
132
134
( ) =>
133
135
createStyleSheet ( {
@@ -164,7 +166,7 @@ export default function InputRowRadioButtons<TItemKey: string>(props: Props<TIte
164
166
< ZulipTextIntl text = { selectedItem . title } style = { styles . valueTitle } />
165
167
</ View >
166
168
< View style = { styles . iconRightWrapper } >
167
- < IconRight size = { kRightArrowIconSize } color = { BRAND_COLOR } />
169
+ < IconRight size = { kRightArrowIconSize } color = { themeData . color } />
168
170
</ View >
169
171
</ View >
170
172
</ Touchable >
0 commit comments