diff options
author | Ivan Chen <ivan@tagg.id> | 2021-07-16 18:32:34 -0400 |
---|---|---|
committer | Ivan Chen <ivan@tagg.id> | 2021-07-16 18:32:34 -0400 |
commit | dffa6b5853f573126ac14a353ab2f3b01321b16c (patch) | |
tree | a3188020d5148ff60089d3575a477862c7e84b4b /src/components | |
parent | f404ad6b192b1e2f0466061c951ef3d131737a4c (diff) |
Add save button
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/camera/SaveButton.tsx | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/components/camera/SaveButton.tsx b/src/components/camera/SaveButton.tsx index 0e220497..104e7c30 100644 --- a/src/components/camera/SaveButton.tsx +++ b/src/components/camera/SaveButton.tsx @@ -1,23 +1,18 @@ import React from 'react'; import {Text, TouchableOpacity} from 'react-native'; import SaveIcon from '../../assets/icons/camera/save.svg'; -import {saveImageToGallery} from '../../utils/camera'; import {styles} from './styles'; interface SaveButtonProps { - capturedImageURI: string; + onPress: () => void; } /* * Appears when a picture has been taken, * On click, saves the captured image to "Recents" album on device gallery */ -export const SaveButton: React.FC<SaveButtonProps> = ({capturedImageURI}) => ( - <TouchableOpacity - onPress={() => { - saveImageToGallery(capturedImageURI); - }} - style={styles.saveButton}> +export const SaveButton: React.FC<SaveButtonProps> = ({onPress}) => ( + <TouchableOpacity onPress={onPress} style={styles.saveButton}> <SaveIcon width={40} height={40} /> <Text style={styles.saveButtonLabel}>Save</Text> </TouchableOpacity> |