Files
speckle-server/packages/frontend-2/components/workspace/header/DescriptionDialog.vue
T
andrewwallacespeckle 033eb279e0 refactor(fe2): If description is line-clamped show read more and description dialog (#2955)
* Add read more and dialog for workspace description

* Troubleshooting

* Improve "Read more" button reactivity in workspace header
2024-09-26 09:39:33 +01:00

31 lines
602 B
Vue

<template>
<LayoutDialog
v-model:open="isOpen"
max-width="sm"
:buttons="dialogButtons"
title="Workspace description"
>
<div class="mb-2">{{ description }}</div>
</LayoutDialog>
</template>
<script setup lang="ts">
import type { LayoutDialogButton } from '@speckle/ui-components'
defineProps<{
description: string
}>()
const isOpen = defineModel<boolean>('open', { required: true })
const dialogButtons = computed((): LayoutDialogButton[] => [
{
text: 'Close',
props: { color: 'primary' },
onClick: () => {
isOpen.value = false
}
}
])
</script>