Massive/MassiveFab.tsx

27 lines
618 B
TypeScript
Raw Normal View History

2022-07-08 02:59:19 +00:00
import React from 'react';
2022-07-15 06:06:33 +00:00
import {useColorScheme} from 'react-native';
import {FAB} from 'react-native-paper';
2022-08-26 01:54:51 +00:00
import {CombinedDarkTheme, CombinedDefaultTheme} from './App';
2022-07-08 02:59:19 +00:00
export default function MassiveFab(
2022-07-15 06:06:33 +00:00
props: Partial<React.ComponentProps<typeof FAB>>,
2022-07-08 02:59:19 +00:00
) {
2022-07-15 06:06:33 +00:00
const dark = useColorScheme() === 'dark';
2022-07-08 02:59:19 +00:00
return (
2022-07-15 06:06:33 +00:00
<FAB
2022-07-08 02:59:19 +00:00
{...props}
icon="add"
2022-08-26 01:54:51 +00:00
color="black"
2022-07-15 06:06:33 +00:00
style={{
position: 'absolute',
right: 10,
bottom: 60,
backgroundColor: dark
2022-08-26 01:54:51 +00:00
? CombinedDarkTheme.colors.primary
: CombinedDefaultTheme.colors.primary,
2022-07-15 06:06:33 +00:00
}}
2022-07-08 02:59:19 +00:00
/>
);
}