Skip to content

Commit

Permalink
fix: direction
Browse files Browse the repository at this point in the history
  • Loading branch information
productdevbook committed Sep 18, 2023
1 parent bc83ca3 commit ae87975
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions packages/components/scroll-area/src/props.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { primitiveProps, propsOmit } from '@oku-ui/primitive'
import { ScopePropObject, createProvideScope } from '@oku-ui/provide'
import type { PropType, Ref } from 'vue'

import type { Direction } from '@oku-ui/direction'
import type { OkuElement, PrimitiveProps } from '@oku-ui/primitive'
import type { Scope } from '@oku-ui/provide'

Expand Down Expand Up @@ -29,7 +29,6 @@ export const SCROLL_AREA_CORNER_IMPL_NAME = 'OkuScrollAreaCornerImpl'
* ScrollArea - scroll-area.ts
* ----------------------------------------------------------------------------------------------- */

export type Direction = 'ltr' | 'rtl'
export type Sizes = {
content: number
viewport: number
Expand All @@ -45,7 +44,7 @@ export type ScrollAreaElement = HTMLDivElement

export type ScrollAreaProvideValue = {
type: Ref<'auto' | 'always' | 'scroll' | 'hover'>
dir: Ref<Direction>
dir: Ref<Direction | undefined>
scrollHideDelay: Ref<number>
scrollArea: Ref<ScrollAreaElement | null>
viewport: Ref<ScrollAreaViewportElement | null>
Expand Down
2 changes: 1 addition & 1 deletion packages/components/scroll-area/src/scroll-area.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const scrollArea = defineComponent({
const scrollbarYEnabled = ref<boolean>(false)
const forwardedRef = useForwardRef()
const composedRefs = useComposedRefs(forwardedRef, node => scrollArea.value = (node as ScrollAreaElement))
const direction = useDirection(dir.value)
const direction = useDirection(dir)

scrollAreaProvider({
scope: scopeOkuScrollArea.value,
Expand Down

0 comments on commit ae87975

Please sign in to comment.