Files
windmill/frontend/src/lib/components/ConfirmButton.svelte
wendrul 6987a36846 feat: indexer extra settings + parallel downloads + many improvements (#4822)
* Nits on the service logs page

* Show all the hosts returned by query + sumOtherDocCount warning

* Remove from index endpoint

* Fix tests

* Prepare sqlx
2024-11-29 19:14:05 +01:00

34 lines
648 B
Svelte

<script lang="ts">
import { Button } from './common'
import { Check, X } from 'lucide-svelte'
import { createEventDispatcher } from 'svelte'
export let confirmation: string = 'Are you sure?'
let firstClick = false
const dispatch = createEventDispatcher()
</script>
<div class="p-2 flex flex-row w-full gap-2">
{#if !firstClick}
<Button
on:click={() => {
firstClick = true
}}><slot /></Button
>
{:else}
{confirmation}
<Button
color="red"
on:click={() => {
firstClick = false
dispatch('click')
}}><Check /></Button
>
<Button
on:click={() => {
firstClick = false
}}><X /></Button
>
{/if}
</div>