import React from 'react'; import I18n from '../../i18n'; import { useTheme } from '../../theme'; import * as List from '../../containers/List'; import { IBrowsersValues, TValue } from '.'; interface IRenderItem extends IBrowsersValues { browser: string | null; changeDefaultBrowser: (newBrowser: TValue) => void; } const Item = ({ title, value, browser, changeDefaultBrowser }: IRenderItem) => { const { colors } = useTheme(); let isSelected = false; if (!browser && value === 'systemDefault:') { isSelected = true; } else { isSelected = browser === value; } return ( changeDefaultBrowser(value)} testID={`default-browser-view-${title}`} right={() => (isSelected ? : null)} translateTitle={false} /> ); }; export default Item;