Skip to content

Commit

Permalink
Merge pull request #4506 from nextcloud-libraries/feat/empty-content-…
Browse files Browse the repository at this point in the history
…centered
  • Loading branch information
skjnldsv committed Sep 8, 2023
2 parents 365cbad + a485280 commit ca177c2
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 23 deletions.
2 changes: 0 additions & 2 deletions src/components/NcDashboardWidget/NcDashboardWidget.vue
Expand Up @@ -351,11 +351,9 @@ export default {
<style scoped lang="scss">
.dashboard-widget :deep(.empty-content) {
text-align: center;
margin-top: 0;
padding-top: 5vh;
&.half-screen {
padding-top: 0;
margin-top: 0;
margin-bottom: 1vh;
}
}
Expand Down
12 changes: 11 additions & 1 deletion src/components/NcEmptyContent/NcEmptyContent.vue
Expand Up @@ -168,11 +168,19 @@ export default {
name: 'NcEmptyContent',
props: {
/**
* A header message about an empty content shown
* @example 'No comments'
*/
name: {
type: String,
default: '',
},
/**
* Desription of the empty content
* @example 'No comments yet, start the conversation!'
*/
description: {
type: String,
default: '',
Expand All @@ -198,7 +206,9 @@ export default {
display: flex;
align-items: center;
flex-direction: column;
margin-top: 20vh;
justify-content: center;
/* In case of using in a flex container - flex in advance */
flex-grow: 1;
.modal-wrapper & {
margin-top: 5vh;
Expand Down
Expand Up @@ -111,11 +111,6 @@ export default {
display: flex;
flex-direction: column;
&--empty-content {
margin-top: auto !important;
margin-bottom: auto !important;
}
&--select {
width: 100%;
Expand Down
15 changes: 5 additions & 10 deletions src/components/NcRichText/NcReferencePicker/NcRawLinkInput.vue
Expand Up @@ -137,16 +137,11 @@ export default {
display: flex;
}
&--empty-content {
margin-top: auto !important;
margin-bottom: auto !important;
.provider-icon {
width: 150px;
height: 150px;
object-fit: contain;
filter: var(--background-invert-if-dark);
}
&--empty-content .provider-icon {
width: 150px;
height: 150px;
object-fit: contain;
filter: var(--background-invert-if-dark);
}
&--input {
Expand Down
5 changes: 0 additions & 5 deletions src/components/NcRichText/NcReferencePicker/NcSearch.vue
Expand Up @@ -293,11 +293,6 @@ export default {
min-height: 400px;
}
&--empty-content {
margin-top: auto !important;
margin-bottom: auto !important;
}
.provider-icon {
width: 150px;
height: 150px;
Expand Down

0 comments on commit ca177c2

Please sign in to comment.