Skip to content

Commit

Permalink
Merge pull request #4313 from nextcloud/backport/4312/stable7
Browse files Browse the repository at this point in the history
  • Loading branch information
skjnldsv committed Jul 8, 2023
2 parents 91787fd + 5ce5894 commit 431cfec
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
29 changes: 29 additions & 0 deletions src/components/NcEmptyContent/NcEmptyContent.vue
Expand Up @@ -46,6 +46,33 @@ export default {
}
</script>
```
#### With custom svg

```
<template>
<NcEmptyContent
name="No files in here">
<template #icon>
<NcIconSvgWrapper :svg="folderSvg" />
</template>
</NcEmptyContent>
</template>

<script>
import folderSvg from '@mdi/svg/svg/folder.svg?raw'
export default {
components: {
Comment,
},
data() {
return {
folderSvg,
}
},
}
</script>
```

You can also customize the title using the `#title` slot
and add actions.
Expand Down Expand Up @@ -191,6 +218,8 @@ export default {
:deep(svg) {
width: 64px;
height: 64px;
max-width: 64px;
max-height: 64px;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/NcIconSvgWrapper/NcIconSvgWrapper.vue
Expand Up @@ -139,8 +139,8 @@ export default {
display: flex;
justify-content: center;
align-items: center;
width: 44px;
height: 44px;
min-width: 44px;
min-height: 44px;
opacity: 1;
&:deep(svg) {
Expand Down

0 comments on commit 431cfec

Please sign in to comment.