1
0
Fork 0
mirror of synced 2024-07-08 07:46:10 +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 aef14aa35d
commit 8aeb1654ff
2 changed files with 3 additions and 0 deletions

View file

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

View file

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