aboutsummaryrefslogtreecommitdiff
path: root/src/components/camera/SaveButton.tsx
blob: d1b87e65c25abf6a060088b39523ec2cda0755f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import React from 'react';
import {StyleProp, Text, TouchableOpacity, ViewStyle} from 'react-native';
import SaveIcon from '../../assets/icons/camera/save.svg';
import {styles} from './styles';

interface SaveButtonProps {
  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> = ({onPress, style}) => (
  <TouchableOpacity onPress={onPress} style={[styles.saveButton, style]}>
    <SaveIcon width={40} height={40} />
    <Text style={styles.saveButtonLabel}>Save</Text>
  </TouchableOpacity>
);

export default SaveButton;