laconic-wallet/components/Dialog.tsx
Adwait Gharpure 31c6999e9f UI to add multiple accounts (#16)
* Change button position

* Keep reset button at the bottom

* Use dropdown for accounts in separate component

* Display data of selected account

* Add method to add multiple accounts

* Change reset button position

* Clear account state on reset

* Display correct account info after creating

* Added account info to sign page

* Change variable names

* Use consistent variable names

* Use account id in ui

* Make review changes

* Fix imports

---------

Co-authored-by: Adw8 <adwait@deepstacksoft.com>
2024-02-19 12:12:18 +05:30

31 lines
682 B
TypeScript

import React from 'react';
import { Button, Dialog, Portal, Text } from 'react-native-paper';
type CustomDialogProps = {
visible: boolean;
hideDialog: () => void;
contentText: string;
titleText?: string;
};
const DialogComponent: React.FC<CustomDialogProps> = ({
visible,
hideDialog,
contentText,
}) => {
return (
<Portal>
<Dialog visible={visible} onDismiss={hideDialog}>
<Dialog.Content>
<Text variant="titleMedium">{contentText}</Text>
</Dialog.Content>
<Dialog.Actions>
<Button onPress={hideDialog}>Done</Button>
</Dialog.Actions>
</Dialog>
</Portal>
);
};
export { DialogComponent };