blob: d3ee793eddc89a09b414f4882b5b0fd236766091 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
<!--
- SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
- SPDX-License-Identifier: AGPL-3.0-or-later
-->
<template>
<NcButton type="tertiary" :href="href">
<template #icon>
<slot name="icon" />
</template>
<div class="download-button">
<span class="download-button__label">
<slot name="default" />
</span>
<IconDownload class="download-button__icon"
:size="20" />
</div>
</NcButton>
</template>
<script>
import { NcButton } from '@nextcloud/vue'
import IconDownload from 'vue-material-design-icons/Download.vue'
export default {
name: 'ExampleContentDownloadButton',
components: {
NcButton,
IconDownload
},
props: {
href: {
type: String,
required: true,
}
},
}
</script>
<style lang="scss" scoped>
.download-button {
display: flex;
max-width: 200px;
&__label {
font-weight: initial;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
&__icon {
margin-top: 2px;
margin-inline-start: var(--default-grid-baseline);
}
}
</style>
|