Skip to content

Commit

Permalink
chore(vue3): Migrate NcEmptyContent
Browse files Browse the repository at this point in the history
Signed-off-by: Raimund Schlüßler <[email protected]>
  • Loading branch information
raimund-schluessler committed Sep 28, 2023
1 parent abd20c2 commit de9c9e8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 18 deletions.
20 changes: 4 additions & 16 deletions src/components/NcEmptyContent/NcEmptyContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@ export default {
</div>
<!-- @slot Optional name if not set as property, shall be enclosed by a header element -->
<slot name="name">
<h2 v-if="hasName" class="empty-content__name">
<h2 v-if="name !== ''" class="empty-content__name">
{{ name }}
</h2>
</slot>
<p v-if="hasDescription">
<p v-if="description !== '' || $slots.description">
<!-- @slot Optional formatted description rendered inside a paragraph -->
<slot name="description">
{{ description }}
Expand Down Expand Up @@ -186,18 +186,6 @@ export default {
default: '',
},
},
computed: {
hasName() {
return this.name !== ''
},
/**
* Check if a description is given as either property or slot
*/
hasDescription() {
return this.description !== '' || this.$slots.description?.[0]
},
},
}
</script>

Expand Down Expand Up @@ -228,8 +216,8 @@ export default {
background-size: 64px;
:deep(svg) {
width: 64px;
height: 64px;
width: 64px !important;
height: 64px !important;
max-width: 64px !important;
max-height: 64px !important;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export { default as NcDateTimePickerNative } from './NcDateTimePickerNative/inde

// Not yet adjusted for vue3
// export { default as NcEmojiPicker } from './NcEmojiPicker/index.js'
// export { default as NcEmptyContent } from './NcEmptyContent/index.js'
export { default as NcEmptyContent } from './NcEmptyContent/index.js'
export { default as NcGuestContent } from './NcGuestContent/index.js'
// export { default as NcHeaderMenu } from './NcHeaderMenu/index.js'
export { default as NcHighlight } from './NcHighlight/index.js'
Expand Down
1 change: 0 additions & 1 deletion styleguide.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ module.exports = async () => {

// Not yet adjusted for vue3
'src/components/NcAvatar*/*.vue',
'src/components/NcEmptyContent*/*.vue',
'src/components/NcHeaderMenu*/*.vue',
'src/components/NcModal*/*.vue',
'src/components/NcRelatedResourcesPanel*/*.vue',
Expand Down

0 comments on commit de9c9e8

Please sign in to comment.