1
0
Fork 0
mirror of synced 2024-07-05 06:20:55 +12:00

adds warning prop to ModalContent to enable warning buttons

This commit is contained in:
Keviin Åberg Kultalahti 2021-05-07 14:56:27 +02:00
parent 04b332e104
commit ea8e6d675d
2 changed files with 3 additions and 0 deletions

View file

@ -9,6 +9,7 @@
export let title = undefined
export let size = "S"
export let cancelText = "Cancel"
export let warning = false
export let confirmText = "Confirm"
export let showCancelButton = true
export let showConfirmButton = true
@ -60,6 +61,7 @@
{/if}
{#if showConfirmButton}
<Button
{warning}
group
cta
{...$$restProps}

View file

@ -65,6 +65,7 @@
<Modal bind:this={deleteUserModal}>
<ModalContent
warning
title="Delete User"
confirmText="Delete user"
cancelText="Cancel"