va-timeline-item.vue
1.43 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<template>
<tr class="va-timeline-item">
<td class="va-timeline-item__icon-cell">
<div class="va-timeline-item__icon">
<VaIcon name="schedule" size="22px" color="backgroundBorder" />
</div>
</td>
<td class="va-timeline-item__content-cell">
<div class="va-timeline-item__content">
<slot />
</div>
</td>
<td class="va-timeline-item__date-cell">
<slot name="date">
{{ $props.date }}
</slot>
</td>
</tr>
</template>
<script setup lang="ts">
defineProps({
date: {
type: String,
default: '',
},
})
</script>
<style lang="scss" scoped>
.va-timeline-item {
display: table-row;
&__icon-cell {
vertical-align: top;
height: 1px;
padding-right: 1rem;
}
&__icon {
width: 24px;
position: relative;
display: inline-flex;
justify-content: center;
flex-direction: column;
align-items: center;
height: 100%;
&::after {
content: '';
width: 2px;
height: 100%;
background: var(--va-background-border);
}
}
&__content {
margin-bottom: 1rem;
}
&__content-cell {
width: 100%;
}
&__date-cell {
vertical-align: top;
color: var(--va-secondary);
text-wrap: nowrap;
white-space: nowrap;
padding-left: 0.5rem;
text-align: end;
}
&:last-child {
.va-timeline-item__icon {
&::after {
background: transparent;
}
}
}
}
</style>