mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-02-01 04:37:57 +01:00
feat(AlertDialog): create component (#26)
This commit is contained in:
committed by
GitHub
parent
06cd63d954
commit
71371ac34e
@@ -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 what’s 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'
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user