feat(AlertDialog): create component (#26)

This commit is contained in:
Sylvain Marroufin
2022-01-21 14:40:48 +01:00
committed by GitHub
parent 06cd63d954
commit 71371ac34e
6 changed files with 133 additions and 4 deletions

View File

@@ -100,6 +100,7 @@ const is = `U${params.component}`
const component = nuxtApp.vueApp.component(is)
const alertDialog = ref(false)
const toggle = ref(false)
const modal = ref(false)
@@ -113,6 +114,19 @@ const defaultProps = {
Alert: {
title: 'A new software update is available. See whats new in version 2.0.4.'
},
AlertDialog: {
title: 'Are you sure you want to close this modal?',
modelValue: alertDialog,
'onUpdate:modelValue': (v) => { alertDialog.value = v },
component: {
name: 'Button',
props: {
variant: 'secondary',
label: 'Open modal',
onClick: () => { alertDialog.value = true }
}
}
},
Avatar: {
src: 'https://picsum.photos/200/300'
},