Skip to content

Commit 92d1fc9

Browse files
authored
Merge pull request #6910 from nextcloud-libraries/refactor/app-content-details
refactor(NcAppContentDetails): migrate component to Typescript
2 parents 7ee8431 + 4e2199c commit 92d1fc9

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

src/components/NcAppContentDetails/NcAppContentDetails.vue

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,20 @@
33
- SPDX-License-Identifier: AGPL-3.0-or-later
44
-->
55

6+
<script setup lang="ts">
7+
import type { Slot } from 'vue'
8+
9+
defineSlots<{
10+
/**
11+
* Provide content to the details view.
12+
* Passing content to this slot is required!
13+
*/
14+
default?: Slot
15+
}>()
16+
</script>
17+
618
<template>
719
<div class="app-content-details">
8-
<!-- @slot Provide content to the details view -->
920
<slot />
1021
</div>
1122
</template>
12-
13-
<script>
14-
export default {
15-
name: 'NcAppContentDetails',
16-
}
17-
</script>

src/components/index.ts

Lines changed: 1 addition & 1 deletion
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)