Skip to content

Commit bdcb626

Browse files
committed
refactor(NcAppContentDetails): migrate component to Typescript
Signed-off-by: Ferdinand Thiessen <[email protected]>
1 parent 97ce6bd commit bdcb626

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

src/components/NcAppContentDetails/NcAppContentDetails.vue

+10-5
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,18 @@
55

66
<template>
77
<div class="app-content-details">
8-
<!-- @slot Provide content to the details view -->
98
<slot />
109
</div>
1110
</template>
1211

13-
<script>
14-
export default {
15-
name: 'NcAppContentDetails',
16-
}
12+
<script setup lang="ts">
13+
import type { Slot } from 'vue'
14+
15+
defineSlots<{
16+
/**
17+
* Provide content to the details view.
18+
* Passing content to this slot is required!
19+
*/
20+
default: Slot
21+
}>()
1722
</script>

src/components/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export { default as NcActionSeparator } from './NcActionSeparator/index.js'
1616
export { default as NcActionText } from './NcActionText/index.js'
1717
export { default as NcActionTextEditable } from './NcActionTextEditable/index.js'
1818
export { default as NcAppContent } from './NcAppContent/index.js'
19-
export { default as NcAppContentDetails } from './NcAppContentDetails/index.js'
19+
export { default as NcAppContentDetails } from './NcAppContentDetails/index.ts'
2020
export { default as NcAppContentList } from './NcAppContentList/index.js'
2121
export { default as NcAppNavigation } from './NcAppNavigation/index.js'
2222
export { default as NcAppNavigationCaption } from './NcAppNavigationCaption/index.js'

0 commit comments

Comments
 (0)