chore: lint
This commit is contained in:
@@ -14,24 +14,24 @@ interface ConfirmationBoxProps {
|
|||||||
|
|
||||||
// New component for the confirmation box inside the modal
|
// New component for the confirmation box inside the modal
|
||||||
const ConfirmationBox = ({ selector, onYes, onNo }: ConfirmationBoxProps) => {
|
const ConfirmationBox = ({ selector, onYes, onNo }: ConfirmationBoxProps) => {
|
||||||
return (
|
return (
|
||||||
<Box sx={{ textAlign: 'center' }}>
|
<Box sx={{ textAlign: 'center' }}>
|
||||||
<Typography variant="h6" component="h2" gutterBottom>
|
<Typography variant="h6" component="h2" gutterBottom>
|
||||||
Confirmation
|
Confirmation
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant="body1" gutterBottom>
|
<Typography variant="body1" gutterBottom>
|
||||||
Do you want to interact with the element: {selector}?
|
Do you want to interact with the element: {selector}?
|
||||||
</Typography>
|
</Typography>
|
||||||
<Box sx={{ mt: 2, display: 'flex', justifyContent: 'center', gap: 2 }}>
|
<Box sx={{ mt: 2, display: 'flex', justifyContent: 'center', gap: 2 }}>
|
||||||
<Button variant="contained" color="primary" onClick={onYes}>
|
<Button variant="contained" color="primary" onClick={onYes}>
|
||||||
Yes
|
Yes
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant="contained" color="secondary" onClick={onNo}>
|
<Button variant="contained" color="secondary" onClick={onNo}>
|
||||||
No
|
No
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const BrowserWindow = () => {
|
export const BrowserWindow = () => {
|
||||||
@@ -127,16 +127,16 @@ export const BrowserWindow = () => {
|
|||||||
{
|
{
|
||||||
showConfirmation ? (
|
showConfirmation ? (
|
||||||
<GenericModal
|
<GenericModal
|
||||||
isOpen={showConfirmation}
|
isOpen={showConfirmation}
|
||||||
onClose={() => setShowConfirmation(false)}
|
onClose={() => setShowConfirmation(false)}
|
||||||
canBeClosed={false}
|
canBeClosed={false}
|
||||||
>
|
>
|
||||||
<ConfirmationBox
|
<ConfirmationBox
|
||||||
selector={highlighterData?.selector || ''}
|
selector={highlighterData?.selector || ''}
|
||||||
onYes={() => handleConfirmation(true)}
|
onYes={() => handleConfirmation(true)}
|
||||||
onNo={() => handleConfirmation(false)}
|
onNo={() => handleConfirmation(false)}
|
||||||
/>
|
/>
|
||||||
</GenericModal>
|
</GenericModal>
|
||||||
) : null
|
) : null
|
||||||
}
|
}
|
||||||
{(!showConfirmation && highlighterData?.rect != null && highlighterData?.rect.top != null) && canvasRef?.current ?
|
{(!showConfirmation && highlighterData?.rect != null && highlighterData?.rect.top != null) && canvasRef?.current ?
|
||||||
|
|||||||
Reference in New Issue
Block a user