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

[stable7] fix: NcIconSvgWrapper size #4313

Merged
merged 1 commit into from
Jul 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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