mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-22 22:18:43 +00:00
21 lines
494 B
TypeScript
21 lines
494 B
TypeScript
'use client'
|
|
|
|
import * as React from 'react'
|
|
import { Direction } from 'radix-ui'
|
|
|
|
function DirectionProvider({
|
|
dir,
|
|
direction,
|
|
children,
|
|
}: React.ComponentProps<typeof Direction.DirectionProvider> & {
|
|
direction?: React.ComponentProps<typeof Direction.DirectionProvider>['dir']
|
|
}) {
|
|
return (
|
|
<Direction.DirectionProvider dir={direction ?? dir}>{children}</Direction.DirectionProvider>
|
|
)
|
|
}
|
|
|
|
const useDirection = Direction.useDirection
|
|
|
|
export { DirectionProvider, useDirection }
|