Remove hard coded colors in MassiveFab

This commit is contained in:
Brandon Presley 2022-11-02 12:26:46 +13:00
parent 07a3d240ea
commit 202d34d785
1 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,6 @@
import {ComponentProps} from 'react' import {ComponentProps} from 'react'
import {FAB, useTheme} from 'react-native-paper' import {FAB, useTheme} from 'react-native-paper'
import {CombinedDarkTheme, CombinedDefaultTheme} from './App'
import {lightColors} from './colors' import {lightColors} from './colors'
export default function MassiveFab(props: Partial<ComponentProps<typeof FAB>>) { export default function MassiveFab(props: Partial<ComponentProps<typeof FAB>>) {
@ -8,8 +9,8 @@ export default function MassiveFab(props: Partial<ComponentProps<typeof FAB>>) {
const fabColor = lightColors const fabColor = lightColors
.map(lightColor => lightColor.hex) .map(lightColor => lightColor.hex)
.includes(colors.primary) .includes(colors.primary)
? 'black' ? CombinedDarkTheme.colors.background
: undefined : CombinedDefaultTheme.colors.background
return ( return (
<FAB <FAB