diff --git a/MassiveFab.tsx b/MassiveFab.tsx index 5c52524..6bb1bbc 100644 --- a/MassiveFab.tsx +++ b/MassiveFab.tsx @@ -1,17 +1,21 @@ import React, {useContext} from 'react'; import {FAB} from 'react-native-paper'; import {CustomTheme} from './App'; +import {lightColors} from './colors'; export default function MassiveFab( props: Partial>, ) { const {color} = useContext(CustomTheme); + const fabColor = lightColors.map(lightColor => lightColor.hex).includes(color) + ? 'black' + : undefined; return ( { - name: string; - value?: T; - onChange: (value: T) => void; -} - export default function SettingsPage() { const [battery, setBattery] = useState(false); const [ignoring, setIgnoring] = useState(false); @@ -192,10 +188,13 @@ export default function SettingsPage() { dropdownIconColor={color} selectedValue={color} onValueChange={value => setColor(value)}> - - - - + {darkColors.concat(lightColors).map(darkColor => ( + + ))} )} diff --git a/colors.ts b/colors.ts new file mode 100644 index 0000000..a97751f --- /dev/null +++ b/colors.ts @@ -0,0 +1,9 @@ +export const lightColors = [ + {hex: '#B3E5FC', name: 'Cyan'}, + {hex: '#FFC0CB', name: 'Pink'}, +]; + +export const darkColors = [ + {hex: '#8156A7', name: 'Purple'}, + {hex: '#007AFF', name: 'Blue'}, +]; diff --git a/input.ts b/input.ts new file mode 100644 index 0000000..15a2cff --- /dev/null +++ b/input.ts @@ -0,0 +1,5 @@ +export default interface Input { + name: string; + value?: T; + onChange: (value: T) => void; +}