Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(NcEmptyContent)!: make empty content centered by default instead of 20vh margin #4506

Merged
merged 2 commits into from Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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