forked from cerc-io/laconic-wallet
* Add ui library * Replace alert with dialog on wallet creation * Add review changes * Add semicolon * Remove comment --------- Co-authored-by: Adw8 <adwait@deepstacksoft.com>
27 lines
686 B
TypeScript
27 lines
686 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, titleText, 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 };
|