Remove color setting from MassiveFab
This makes the button automatically adjust according to what the user has set the primary color to be. Seems that with the default dark theme the cyan makes the text not the same color as the Button, but this still looks better than the statically set colors from before.
This commit is contained in:
parent
e516cdfdc0
commit
0ebe084465
|
@ -1,19 +1,16 @@
|
||||||
import React, {useContext} from 'react';
|
import React, {useContext} from 'react';
|
||||||
import {useColorScheme} from 'react-native';
|
|
||||||
import {FAB} from 'react-native-paper';
|
import {FAB} from 'react-native-paper';
|
||||||
import {CombinedDarkTheme, CustomTheme} from './App';
|
import {CustomTheme} from './App';
|
||||||
|
|
||||||
export default function MassiveFab(
|
export default function MassiveFab(
|
||||||
props: Partial<React.ComponentProps<typeof FAB>>,
|
props: Partial<React.ComponentProps<typeof FAB>>,
|
||||||
) {
|
) {
|
||||||
const dark = useColorScheme() === 'dark';
|
|
||||||
const {color} = useContext(CustomTheme);
|
const {color} = useContext(CustomTheme);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<FAB
|
<FAB
|
||||||
{...props}
|
{...props}
|
||||||
icon="add"
|
icon="add"
|
||||||
color={dark ? CombinedDarkTheme.colors.background : 'white'}
|
|
||||||
style={{
|
style={{
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
right: 10,
|
right: 10,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user