File size: 929 Bytes
fcdfd72
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<script lang="ts">
  import { createEventDispatcher } from "svelte";
  import { IconButton } from "@gradio/atoms";
  import { Undo, Erase, Clear } from "@gradio/icons";

  const dispatch = createEventDispatcher();
</script>

<div>
  <IconButton
    Icon={Undo}
    label="Remove Last Box"
    on:click={(event) => {
      dispatch("remove_box");
      event.stopPropagation();
    }}
  />

  <IconButton
    Icon={Erase}
    label="Remove All boxes"
    on:click={(event) => {
      dispatch("remove_boxes");
      event.stopPropagation();
    }}
  />

  <IconButton
    Icon={Clear}
    label="Remove Image"
    on:click={(event) => {
      dispatch("remove_image");
      event.stopPropagation();
    }}
  />
</div>

<style>
  div {
    display: flex;
    position: absolute;
    top: var(--size-2);
    right: var(--size-2);
    justify-content: flex-end;
    gap: var(--spacing-sm);
    z-index: var(--layer-5);
  }
</style>