2020-09-27 13:05:26 +05:00
|
|
|
import React from 'react';
|
2020-11-02 20:46:58 +05:00
|
|
|
import {StyleSheet, View} from 'react-native';
|
2020-11-14 10:02:56 +05:00
|
|
|
import {SIZE} from '../../utils/SizeUtils';
|
2020-09-27 13:05:26 +05:00
|
|
|
import {Button} from '../Button';
|
|
|
|
|
|
|
|
|
|
const DialogButtons = ({
|
|
|
|
|
onPressPositive,
|
|
|
|
|
onPressNegative,
|
|
|
|
|
positiveTitle,
|
|
|
|
|
negativeTitle = 'Cancel',
|
|
|
|
|
}) => {
|
|
|
|
|
return (
|
2020-11-14 10:02:56 +05:00
|
|
|
<View style={styles.container}>
|
|
|
|
|
<Button
|
|
|
|
|
onPress={onPressNegative}
|
|
|
|
|
fontSize={SIZE.md}
|
2020-11-14 11:38:31 +05:00
|
|
|
type="gray"
|
2020-11-14 10:02:56 +05:00
|
|
|
width="30%"
|
|
|
|
|
title={negativeTitle}
|
|
|
|
|
/>
|
|
|
|
|
<Button
|
|
|
|
|
onPress={onPressPositive}
|
|
|
|
|
fontSize={SIZE.md}
|
|
|
|
|
width="30%"
|
2020-11-14 11:38:31 +05:00
|
|
|
type="transparent"
|
2020-11-14 10:02:56 +05:00
|
|
|
title={positiveTitle}
|
|
|
|
|
/>
|
2020-09-27 13:05:26 +05:00
|
|
|
</View>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default DialogButtons;
|
|
|
|
|
|
|
|
|
|
const styles = StyleSheet.create({
|
2020-11-14 10:02:56 +05:00
|
|
|
container: {
|
|
|
|
|
justifyContent: 'flex-end',
|
2020-09-27 13:05:26 +05:00
|
|
|
alignItems: 'center',
|
|
|
|
|
flexDirection: 'row',
|
|
|
|
|
marginTop: 20,
|
2020-11-14 10:02:56 +05:00
|
|
|
|
|
|
|
|
},
|
|
|
|
|
});
|