Line data Source code
1 : <template>
2 2355 : <div
3 : class="content-divider bg-border"
4 : :class="{
5 : 'content-divider--horizontal': orientation === 'horizontal',
6 : 'content-divider--vertical': orientation === 'vertical'
7 : }"
8 : />
9 : </template>
10 :
11 : <script setup lang="ts">
12 : const { orientation = 'horizontal', width = 0.3 } = defineProps<{
13 : orientation?: 'horizontal' | 'vertical'
14 : width?: number
15 : }>()
16 : </script>
17 :
18 : <style scoped>
19 : .content-divider {
20 : display: inline-block;
21 : margin: 0;
22 : padding: 0;
23 : border: none;
24 : flex-shrink: 0;
25 : position: relative;
26 : z-index: 1;
27 : }
28 :
29 : .content-divider--horizontal {
30 : width: 100%;
31 : height: v-bind('width + "px"');
32 : }
33 :
34 : .content-divider--vertical {
35 : height: 100%;
36 : width: v-bind('width + "px"');
37 : }
38 : </style>
|