Organize files

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2023-07-10 09:06:41 +03:00
parent 3ff8521771
commit ab6aa76fa2
5 changed files with 5 additions and 10 deletions

View File

@@ -0,0 +1,54 @@
import * as React from 'react';
import { StyleSheet } from 'react-native';
import { FAB, Portal } from 'react-native-paper';
import { noOp } from '../constants';
import { verticalScale } from '../styles';
const styles = StyleSheet.create({
fab: {
paddingBottom: verticalScale(75),
},
});
const FloatingActionButton = () => {
const [state, setState] = React.useState(false);
return (
<Portal>
<FAB.Group
open={state}
visible
icon={state ? 'image' : 'plus'}
actions={[
{
icon: 'tag',
label: 'Tag',
onPress: () => noOp,
},
{
icon: 'note-text',
label: 'Text',
onPress: () => noOp,
},
{
icon: 'microphone',
label: 'Audio',
onPress: () => noOp,
},
{
icon: 'image-album',
label: 'Album',
onPress: () => noOp,
},
]}
onStateChange={({ open }) => setState(open)}
onPress={() => {
if (state) noOp;
}}
style={styles.fab}
/>
</Portal>
);
};
export default FloatingActionButton;