Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(Slider): orientation=vertical support #734

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/www/src/lib/registry/default/ui/slider/Slider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits)
<template>
<SliderRoot
:class="cn(
'relative flex w-full touch-none select-none items-center',
'relative flex w-full touch-none select-none items-center data-[orientation=vertical]:flex-col data-[orientation=vertical]:w-2 data-[orientation=vertical]:h-full',
props.class,
)"
v-bind="forwarded"
>
<SliderTrack class="relative h-2 w-full grow overflow-hidden rounded-full bg-secondary">
<SliderRange class="absolute h-full bg-primary" />
<SliderTrack class="relative h-2 w-full data-[orientation=vertical]:w-2 grow overflow-hidden rounded-full bg-secondary">
<SliderRange class="absolute h-full data-[orientation=vertical]:w-full bg-primary" />
</SliderTrack>
<SliderThumb
v-for="(_, key) in modelValue"
Expand Down
6 changes: 3 additions & 3 deletions apps/www/src/lib/registry/new-york/ui/slider/Slider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits)
<template>
<SliderRoot
:class="cn(
'relative flex w-full touch-none select-none items-center',
'relative flex w-full touch-none select-none items-center data-[orientation=vertical]:flex-col data-[orientation=vertical]:w-1.5 data-[orientation=vertical]:h-full',
props.class,
)"
v-bind="forwarded"
>
<SliderTrack class="relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20">
<SliderRange class="absolute h-full bg-primary" />
<SliderTrack class="relative h-1.5 w-full data-[orientation=vertical]:w-1.5 grow overflow-hidden rounded-full bg-primary/20">
<SliderRange class="absolute h-full data-[orientation=vertical]:w-full bg-primary" />
</SliderTrack>
<SliderThumb
v-for="(_, key) in modelValue"
Expand Down