From 78fa9b9064123b60ec0e083b4da3552d1e9e2dfa Mon Sep 17 00:00:00 2001 From: John Leider Date: Mon, 22 Apr 2024 21:29:46 -0500 Subject: [PATCH] Revert "fix(VProgressLinear): remove locationStyles" This reverts commit 3f50694e479fae6d8bc8e6cf96953aaf1795005f. closes #19658 --- .../src/components/VProgressLinear/VProgressLinear.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/vuetify/src/components/VProgressLinear/VProgressLinear.tsx b/packages/vuetify/src/components/VProgressLinear/VProgressLinear.tsx index aca17367633..c48123febe1 100644 --- a/packages/vuetify/src/components/VProgressLinear/VProgressLinear.tsx +++ b/packages/vuetify/src/components/VProgressLinear/VProgressLinear.tsx @@ -6,6 +6,7 @@ import { useBackgroundColor, useTextColor } from '@/composables/color' import { makeComponentProps } from '@/composables/component' import { useIntersectionObserver } from '@/composables/intersectionObserver' import { useRtl } from '@/composables/locale' +import { makeLocationProps, useLocation } from '@/composables/location' import { useProxiedModel } from '@/composables/proxiedModel' import { makeRoundedProps, useRounded } from '@/composables/rounded' import { makeTagProps } from '@/composables/tag' @@ -52,6 +53,7 @@ export const makeVProgressLinearProps = propsFactory({ roundedBar: Boolean, ...makeComponentProps(), + ...makeLocationProps({ location: 'top' } as const), ...makeRoundedProps(), ...makeTagProps(), ...makeThemeProps(), @@ -70,6 +72,7 @@ export const VProgressLinear = genericComponent()({ const progress = useProxiedModel(props, 'modelValue') const { isRtl, rtlClasses } = useRtl() const { themeClasses } = provideTheme(props) + const { locationStyles } = useLocation(props) const { textColorClasses, textColorStyles } = useTextColor(props, 'color') const { backgroundColorClasses, backgroundColorStyles } = useBackgroundColor(computed(() => props.bgColor || props.color)) const { backgroundColorClasses: barColorClasses, backgroundColorStyles: barColorStyles } = useBackgroundColor(props, 'color') @@ -117,8 +120,11 @@ export const VProgressLinear = genericComponent()({ ]} style={[ { + bottom: props.location === 'bottom' ? 0 : undefined, + top: props.location === 'top' ? 0 : undefined, height: props.active ? convertToUnit(height.value) : 0, '--v-progress-linear-height': convertToUnit(height.value), + ...locationStyles.value, }, props.style, ]}