Files
speckle-server/packages/frontend-2/components/settings/shared/DeleteUserDialog.vue
T
andrewwallacespeckle d6754d6c80 fix(fe2): Align dialogs with the designs (#2895)
* Updates to Dialogs

* Updates to dialogs
2024-09-09 13:46:53 +01:00

44 lines
964 B
Vue

<template>
<LayoutDialog v-model:open="open" max-width="xs" :buttons="dialogButtons">
<template #header>Remove user</template>
<div class="flex flex-col gap-4 text-body-xs text-foreground">
<p>
Are you sure you want to remove
<span class="font-medium">
{{ name }}
</span>
from the workspace?
</p>
</div>
</LayoutDialog>
</template>
<script setup lang="ts">
import type { LayoutDialogButton } from '@speckle/ui-components'
const emit = defineEmits<{
(e: 'removeUser'): void
}>()
defineProps<{
name: string
}>()
const open = defineModel<boolean>('open', { required: true })
const dialogButtons = computed((): LayoutDialogButton[] => [
{
text: 'Cancel',
props: { color: 'outline' },
onClick: () => (open.value = false)
},
{
text: 'Remove',
props: { color: 'primary' },
onClick: () => {
open.value = false
emit('removeUser')
}
}
])
</script>