mirror of
https://gitlab.com/wheres-the-tp/ui-mobile.git
synced 2026-01-25 15:04:55 -06:00
25 lines
484 B
JavaScript
25 lines
484 B
JavaScript
// @flow
|
|
import React from 'react';
|
|
import { Text, TouchableOpacity } from 'react-native';
|
|
|
|
type Props = {
|
|
loading: boolean,
|
|
onSave: Function,
|
|
};
|
|
|
|
const TopSaveButton = ({ loading, onSave }: Props) => {
|
|
const textStyle = {
|
|
color: 'white',
|
|
marginRight: 20,
|
|
fontWeight: 'bold',
|
|
opacity: loading ? 0.7 : 1,
|
|
};
|
|
|
|
return (
|
|
<TouchableOpacity onPress={loading ? null : onSave}>
|
|
<Text style={textStyle}>SAVE</Text>
|
|
</TouchableOpacity>
|
|
);
|
|
};
|
|
|
|
export default TopSaveButton;
|