Use MUI dialog component for tx error
This commit is contained in:
parent
45638bc031
commit
cb1e0a283a
@ -1,5 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Button, Dialog, Portal, Text } from 'react-native-paper';
|
import { Dialog, DialogTitle, DialogContent, DialogActions, Button, Typography } from '@mui/material';
|
||||||
|
|
||||||
const TxErrorDialog = ({
|
const TxErrorDialog = ({
|
||||||
error,
|
error,
|
||||||
@ -11,17 +11,15 @@ const TxErrorDialog = ({
|
|||||||
hideDialog: () => void;
|
hideDialog: () => void;
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
<Portal>
|
<Dialog open={visible} onClose={hideDialog}>
|
||||||
<Dialog visible={visible} onDismiss={hideDialog}>
|
<DialogTitle>Transaction Error</DialogTitle>
|
||||||
<Dialog.Title>Transaction Error</Dialog.Title>
|
<DialogContent>
|
||||||
<Dialog.Content>
|
<Typography variant="body1">{error}</Typography>
|
||||||
<Text variant="bodyMedium">{error}</Text>
|
</DialogContent>
|
||||||
</Dialog.Content>
|
<DialogActions>
|
||||||
<Dialog.Actions>
|
<Button onClick={hideDialog}>OK</Button>
|
||||||
<Button onPress={hideDialog}>OK</Button>
|
</DialogActions>
|
||||||
</Dialog.Actions>
|
</Dialog>
|
||||||
</Dialog>
|
|
||||||
</Portal>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -143,6 +143,7 @@ const styles = StyleSheet.create({
|
|||||||
buttonContainer: {
|
buttonContainer: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
marginLeft: 20,
|
marginLeft: 20,
|
||||||
|
marginTop: 10,
|
||||||
marginBottom: 10,
|
marginBottom: 10,
|
||||||
justifyContent: 'space-evenly',
|
justifyContent: 'space-evenly',
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user