A button that performs an action when clicked and optionally asks for user confirmation.
Installation
Copy and paste the component source files linked at the top of this page into your project.
Usage
<script lang="ts">
import { ActionButton } from '$lib/components/action-button';
import { updateSettings } from '$lib/actions/settings';
const settings = { name: 'Kyle' };
</script>
<ActionButton action={updateSettings.bind(null, settings)} requireAreYouSure>
Save Settings
</ActionButton>