From c008ad506cbd8125d4ecb148c3f63f998c9f5399 Mon Sep 17 00:00:00 2001 From: John Leider Date: Thu, 28 Mar 2024 23:01:01 -0500 Subject: [PATCH] feat(VTimeline): add more passthrough props to defaults provide --- .../src/components/VTimeline/VTimeline.tsx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/packages/vuetify/src/components/VTimeline/VTimeline.tsx b/packages/vuetify/src/components/VTimeline/VTimeline.tsx index ebbc8e9f4f8..baa80e288b2 100644 --- a/packages/vuetify/src/components/VTimeline/VTimeline.tsx +++ b/packages/vuetify/src/components/VTimeline/VTimeline.tsx @@ -11,10 +11,11 @@ import { makeThemeProps, provideTheme } from '@/composables/theme' // Utilities import { computed, toRef } from 'vue' -import { convertToUnit, genericComponent, propsFactory, useRender } from '@/util' +import { convertToUnit, genericComponent, only, propsFactory, useRender } from '@/util' // Types import type { Prop } from 'vue' +import { makeVTimelineItemProps } from './VTimelineItem' export type TimelineDirection = 'vertical' | 'horizontal' export type TimelineSide = 'start' | 'end' | undefined @@ -41,10 +42,6 @@ export const makeVTimelineProps = propsFactory({ type: String, validator: (v: any) => v == null || ['start', 'end'].includes(v), } as Prop, - lineInset: { - type: [String, Number], - default: 0, - }, lineThickness: { type: [String, Number], default: 2, @@ -55,6 +52,9 @@ export const makeVTimelineProps = propsFactory({ validator: (v: any) => ['start', 'end', 'both'].includes(v), } as Prop, + ...only(makeVTimelineItemProps({ + lineInset: 0, + }), ['dotColor', 'fillDot', 'hideOpposite', 'iconColor', 'lineInset', 'size']), ...makeComponentProps(), ...makeDensityProps(), ...makeTagProps(), @@ -77,7 +77,13 @@ export const VTimeline = genericComponent()({ }, VTimelineItem: { density: toRef(props, 'density'), + dotColor: toRef(props, 'lineColor'), + fillDot: toRef(props, 'fillDot'), + hideOpposite: toRef(props, 'hideOpposite'), + iconColor: toRef(props, 'iconColor'), + lineColor: toRef(props, 'lineColor'), lineInset: toRef(props, 'lineInset'), + size: toRef(props, 'size'), }, })