-
Notifications
You must be signed in to change notification settings - Fork 269
/
Copy pathCalendarPickerOption.vue
61 lines (55 loc) · 1.1 KB
/
CalendarPickerOption.vue
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
58
59
60
61
<!--
- SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
- SPDX-License-Identifier: AGPL-3.0-or-later
-->
<template>
<div class="calendar-picker-option">
<div class="calendar-picker-option__color-indicator"
:style="{ backgroundColor: color }" />
<span class="calendar-picker-option__label">
{{ displayname }}
</span>
<span :class="displayIcon ? 'icon-caret-dark' : ''" />
</div>
</template>
<script>
export default {
name: 'CalendarPickerOption',
props: {
color: {
type: String,
required: true,
},
displayname: {
type: String,
required: true,
},
displayIcon: {
type: Boolean,
default: false,
},
},
}
</script>
<style lang="scss" scoped>
.calendar-picker-option {
width: 100%;
display: flex;
align-items: center;
&__color-indicator {
width: 12px;
height: 12px;
border-radius: 50%;
border: none;
margin-right: calc(var(--default-grid-baseline) * 2);
flex-basis: calc(var(--default-grid-baseline) * 3);
flex-shrink: 0;
}
&__label {
overflow: hidden;
text-overflow: ellipsis;
flex-grow: 1;
max-width: 80px;
}
}
</style>