Files
parcer/src/components/ui/ConfirmationBox.tsx

29 lines
879 B
TypeScript
Raw Normal View History

2024-07-25 22:46:48 +05:30
import React from 'react';
import { Box, Button, IconButton, Stack, Typography } from "@mui/material";
interface ConfirmationBoxProps {
2024-07-25 22:47:09 +05:30
selector: string;
2024-07-25 22:49:33 +05:30
onYes: () => void;
onNo: () => void;
2024-07-25 22:46:48 +05:30
}
2024-07-25 22:49:33 +05:30
export const ConfirmationBox = ({ selector, onYes, onNo }: ConfirmationBoxProps) => {
2024-07-25 22:47:09 +05:30
return (
2024-07-25 22:49:51 +05:30
<Box sx={{ textAlign: 'center' }}>
<Typography variant="h6" component="h2" gutterBottom>
Confirmation
</Typography>
<Typography variant="body1" gutterBottom>
Do you want to interact with the element: {selector}?
</Typography>
<Box sx={{ mt: 2, display: 'flex', justifyContent: 'center', gap: 2 }}>
<Button variant="contained" color="primary" onClick={onYes}>
Yes
</Button>
<Button variant="contained" color="secondary" onClick={onNo}>
No
</Button>
2024-07-25 22:47:09 +05:30
</Box>
2024-07-25 22:49:51 +05:30
</Box>
2024-07-25 22:47:09 +05:30
);
2024-07-25 22:49:33 +05:30
};