mirror of
https://github.com/LukeHagar/OpenAPI.gg.git
synced 2025-12-06 12:37:48 +00:00
20 lines
460 B
Svelte
20 lines
460 B
Svelte
<script lang="ts">
|
|
import { newSpec } from '$lib/db';
|
|
import { db, loadSpec, type APISpec } from '$lib/db';
|
|
import type { CssClasses } from '@skeletonlabs/skeleton';
|
|
|
|
export let width: CssClasses = "w-full"
|
|
</script>
|
|
|
|
<button
|
|
class="btn variant-ghost-error {width}"
|
|
on:click={async () => {
|
|
if (confirm(`Are you sure you want to delete all saved specs?`)) {
|
|
db.apiSpecs.clear();
|
|
loadSpec(structuredClone(newSpec));
|
|
}
|
|
}}
|
|
>
|
|
Delete All
|
|
</button>
|