fix(../V2/SearchHistory): fixed hard coded color + lightmode thing
This commit is contained in:
@@ -1,9 +1,10 @@
|
|||||||
import { View } from 'react-native';
|
import { View } from 'react-native';
|
||||||
import { Text } from 'native-base';
|
import { Text, theme } from 'native-base';
|
||||||
import { useQuery } from '../../Queries';
|
import { useQuery } from '../../Queries';
|
||||||
import API from '../../API';
|
import API from '../../API';
|
||||||
import { translate } from '../../i18n/i18n';
|
import { translate } from '../../i18n/i18n';
|
||||||
import { LoadingView } from '../Loading';
|
import { LoadingView } from '../Loading';
|
||||||
|
import useColorScheme from '../../hooks/colorScheme';
|
||||||
|
|
||||||
type historyRowProps = {
|
type historyRowProps = {
|
||||||
type: string;
|
type: string;
|
||||||
@@ -12,11 +13,14 @@ type historyRowProps = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const HistoryRowComponent = (props: historyRowProps) => {
|
const HistoryRowComponent = (props: historyRowProps) => {
|
||||||
|
const colorScheme = useColorScheme();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
borderTopWidth: 1,
|
borderTopWidth: 1,
|
||||||
borderTopColor: '#9E9E9E',
|
borderColor:
|
||||||
|
colorScheme == 'dark' ? theme.colors.coolGray[400] : theme.colors.coolGray[800],
|
||||||
paddingTop: 5,
|
paddingTop: 5,
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
@@ -28,7 +32,10 @@ const HistoryRowComponent = (props: historyRowProps) => {
|
|||||||
<View>
|
<View>
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
backgroundColor: 'gray',
|
backgroundColor:
|
||||||
|
colorScheme == 'dark'
|
||||||
|
? theme.colors.coolGray[600]
|
||||||
|
: theme.colors.coolGray[400],
|
||||||
borderRadius: 8,
|
borderRadius: 8,
|
||||||
paddingVertical: 4,
|
paddingVertical: 4,
|
||||||
paddingHorizontal: 12,
|
paddingHorizontal: 12,
|
||||||
|
|||||||
Reference in New Issue
Block a user