Massive/MassiveFab.tsx

24 lines
502 B
TypeScript
Raw Normal View History

import React, {useContext} from 'react';
2022-07-15 06:06:33 +00:00
import {FAB} from 'react-native-paper';
import {CustomTheme} 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
) {
const {color} = useContext(CustomTheme);
2022-07-15 06:06:33 +00:00
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"
color={color === '#B3E5fC' ? 'black' : undefined}
2022-07-15 06:06:33 +00:00
style={{
position: 'absolute',
right: 10,
bottom: 60,
backgroundColor: color,
2022-07-15 06:06:33 +00:00
}}
2022-07-08 02:59:19 +00:00
/>
);
}