Skip to content

Commit

Permalink
wip: Provide a new TimeLine component #909
Browse files Browse the repository at this point in the history
  • Loading branch information
cnouguier committed Aug 20, 2024
1 parent 2690c61 commit c4613ff
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions core/client/components/collection/KTimeLine.vue
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ const props = defineProps({
type: Function,
default: undefined
},
sideWidth: {
type: Number,
default: 20
},
header: {
type: [Array, Object],
default: () => null
Expand Down Expand Up @@ -221,6 +225,9 @@ const bodyRendererClass = computed(() => {
const layout = computed(() => {
return $q.screen.lt.md ? 'dense' : 'comfortable'
})
const comfortSize = computed(() => {
return `${props.sideWidth}%`
})
// Watch
watch(items, onCollectionRefreshed)
Expand Down Expand Up @@ -304,10 +311,10 @@ onBeforeUnmount(() => {
width: 100%;
}
.q-timeline--comfortable .q-timeline__subtitle {
width: 15%;
width: v-bind(comfortSize);
}
.q-timeline--comfortable .q-timeline__content {
padding-bottom: 16px;
width: 85%;
width: calc(100% - v-bind(comfortSize));
}
</style>

0 comments on commit c4613ff

Please sign in to comment.