From 79cde3a2191bb8e77849f7eee4edc18755191e17 Mon Sep 17 00:00:00 2001 From: Brandon Presley Date: Mon, 14 Aug 2023 10:54:46 +1200 Subject: [PATCH] Use accurate theme color for switch text Only if no custom color is provided --- Select.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Select.tsx b/Select.tsx index 87aacad..b068398 100644 --- a/Select.tsx +++ b/Select.tsx @@ -1,6 +1,6 @@ import React, { useCallback, useMemo, useState } from "react"; import { View } from "react-native"; -import { Button, Menu, Subheading } from "react-native-paper"; +import { Button, Menu, Subheading, useTheme } from "react-native-paper"; import { ITEM_PADDING } from "./constants"; export interface Item { @@ -21,6 +21,7 @@ function Select({ label?: string; }) { const [show, setShow] = useState(false); + const { colors } = useTheme(); const selected = useMemo( () => items.find((item) => item.value === value) || items[0], @@ -60,7 +61,7 @@ function Select({ > {items.map((item) => ( handlePress(item.value)}