Skip to content

Commit

Permalink
fix: NcIconSvgWrapper size
Browse files Browse the repository at this point in the history
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
  • Loading branch information
skjnldsv authored and backportbot-nextcloud[bot] committed Jul 7, 2023
1 parent 91787fd commit 5ce5894
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 5ce5894

Please sign in to comment.