Fix colors on fabs

This commit is contained in:
Brandon Presley 2023-11-14 14:44:10 +13:00
parent b9473a8b01
commit a7db87c61a
2 changed files with 7 additions and 1 deletions

View File

@ -1,15 +1,19 @@
import { ComponentProps } from "react"; import { ComponentProps } from "react";
import { FAB } from "react-native-paper"; import { FAB, useTheme } from "react-native-paper";
export default function AppFab(props: Partial<ComponentProps<typeof FAB>>) { export default function AppFab(props: Partial<ComponentProps<typeof FAB>>) {
const { colors } = useTheme();
return ( return (
<FAB <FAB
icon="plus" icon="plus"
testID="add" testID="add"
color={colors.background}
style={{ style={{
position: "absolute", position: "absolute",
right: 20, right: 20,
bottom: 20, bottom: 20,
backgroundColor: colors.primary,
}} }}
{...props} {...props}
/> />

View File

@ -78,7 +78,9 @@ export default function TimerPage() {
position: "absolute", position: "absolute",
left: 20, left: 20,
bottom: 20, bottom: 20,
backgroundColor: colors.primary,
}} }}
color={colors.background}
/> />
<AppFab icon="stop" onPress={stop} /> <AppFab icon="stop" onPress={stop} />
</> </>