2022-03-03 00:42:43 +08:00
|
|
|
<script lang="ts">
|
|
|
|
import { createEventDispatcher } from "svelte";
|
2022-04-06 01:11:29 +08:00
|
|
|
import { IconButton } from "@gradio/atoms";
|
2022-05-10 08:26:09 +08:00
|
|
|
import { Undo, Clear } from "@gradio/icons";
|
2022-03-03 00:42:43 +08:00
|
|
|
|
|
|
|
const dispatch = createEventDispatcher();
|
|
|
|
</script>
|
|
|
|
|
2023-01-18 04:47:40 +08:00
|
|
|
<div>
|
2022-12-15 06:13:30 +08:00
|
|
|
<IconButton Icon={Undo} label="Undo" on:click={() => dispatch("undo")} />
|
2022-11-03 07:28:38 +08:00
|
|
|
<IconButton
|
|
|
|
Icon={Clear}
|
2022-12-15 06:13:30 +08:00
|
|
|
label="Clear"
|
2022-11-03 07:28:38 +08:00
|
|
|
on:click={(event) => {
|
|
|
|
dispatch("clear");
|
|
|
|
event.stopPropagation();
|
|
|
|
}}
|
|
|
|
/>
|
2022-03-03 00:42:43 +08:00
|
|
|
</div>
|
2023-01-18 04:47:40 +08:00
|
|
|
|
|
|
|
<style>
|
|
|
|
div {
|
|
|
|
display: flex;
|
|
|
|
position: absolute;
|
|
|
|
top: var(--size-2);
|
|
|
|
right: var(--size-2);
|
|
|
|
justify-content: flex-end;
|
2023-03-07 04:52:31 +08:00
|
|
|
gap: var(--spacing-sm);
|
2023-01-18 04:47:40 +08:00
|
|
|
z-index: var(--layer-5);
|
|
|
|
}
|
|
|
|
</style>
|