diff options
author | Ivan Chen <ivan@tagg.id> | 2021-07-16 21:13:39 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-16 21:13:39 -0400 |
commit | c1b4e35862172b2268a3a53ece0acc807260652e (patch) | |
tree | 40703c8d2dd5abf0a24c07ab8932559ebc2f9cd5 /src/components/camera | |
parent | c22c19c9eeb28641d36cb9df38fe95301e0f768c (diff) | |
parent | 4ebb552aef8c5f6136c9359c54f2e4e1aa921241 (diff) |
Merge branch 'master' into tma988-remove-positioned-tags-for-video-moments
Diffstat (limited to 'src/components/camera')
-rw-r--r-- | src/components/camera/SaveButton.tsx | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/components/camera/SaveButton.tsx b/src/components/camera/SaveButton.tsx index 0e220497..d1b87e65 100644 --- a/src/components/camera/SaveButton.tsx +++ b/src/components/camera/SaveButton.tsx @@ -1,23 +1,19 @@ import React from 'react'; -import {Text, TouchableOpacity} from 'react-native'; +import {StyleProp, Text, TouchableOpacity, ViewStyle} 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; + style?: StyleProp<ViewStyle>; } /* * 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, style}) => ( + <TouchableOpacity onPress={onPress} style={[styles.saveButton, style]}> <SaveIcon width={40} height={40} /> <Text style={styles.saveButtonLabel}>Save</Text> </TouchableOpacity> |