File size: 1,128 Bytes
74aacd5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import React, { useEffect, useState } from 'react'
import Button from '../shared/Button'
import Modal from '../shared/Modal'

interface Props {
  show: boolean
  onClose: () => void
  onCleanClick: () => void
  onReplaceClick: () => void
}

const InteractiveSegReplaceModal = (props: Props) => {
  const { show, onClose, onCleanClick, onReplaceClick } = props

  return (
    <Modal
      onClose={onClose}
      title="Mask exists"
      className="modal-setting"
      show={show}
      showCloseIcon
    >
      <h4 style={{ lineHeight: '24px' }}>
        Do you want to remove it or create a new one?
      </h4>
      <div
        style={{
          display: 'flex',
          width: '100%',
          justifyContent: 'flex-end',
          alignItems: 'center',
          gap: '12px',
        }}
      >
        <Button
          onClick={() => {
            onClose()
            onCleanClick()
          }}
        >
          Remove
        </Button>
        <Button onClick={onReplaceClick} border>
          Create a new one
        </Button>
      </div>
    </Modal>
  )
}

export default InteractiveSegReplaceModal