diff --git a/packages/react-aria-components/docs/DropZone.mdx b/packages/react-aria-components/docs/DropZone.mdx index 70230d9e4d3..aced23a864f 100644 --- a/packages/react-aria-components/docs/DropZone.mdx +++ b/packages/react-aria-components/docs/DropZone.mdx @@ -172,7 +172,7 @@ The `Draggable` component used above is defined below. See [useDrag](useDrag.htm Show code ```tsx example render=false export=true -import {useDrag} from '@react-aria/dnd'; +import {useDrag} from 'react-aria-components'; function Draggable() { let {dragProps, isDragging} = useDrag({ diff --git a/packages/react-aria-components/src/index.ts b/packages/react-aria-components/src/index.ts index c6844907976..36cf3e61b43 100644 --- a/packages/react-aria-components/src/index.ts +++ b/packages/react-aria-components/src/index.ts @@ -76,6 +76,7 @@ export {ToggleButtonGroup, ToggleButtonGroupContext, ToggleGroupStateContext} fr export {Toolbar, ToolbarContext} from './Toolbar'; export {TooltipTrigger, Tooltip, TooltipTriggerStateContext, TooltipContext} from './Tooltip'; export {TreeLoadMoreItem, Tree, TreeItem, TreeContext, TreeItemContent, TreeStateContext} from './Tree'; +export {useDrag, useDrop} from '@react-aria/dnd'; export {useDragAndDrop} from './useDragAndDrop'; export {DropIndicator, DropIndicatorContext, DragAndDropContext} from './DragAndDrop'; export {Virtualizer} from './Virtualizer'; @@ -139,6 +140,7 @@ export type {ToggleButtonGroupProps, ToggleButtonGroupRenderProps} from './Toggl export type {ToolbarProps, ToolbarRenderProps} from './Toolbar'; export type {TooltipProps, TooltipRenderProps, TooltipTriggerComponentProps} from './Tooltip'; export type {TreeProps, TreeRenderProps, TreeItemProps, TreeItemRenderProps, TreeItemContentProps, TreeItemContentRenderProps, TreeLoadMoreItemProps, TreeLoadMoreItemRenderProps} from './Tree'; +export type {DragOptions, DragResult} from '@react-aria/dnd'; export type {DragAndDropHooks, DragAndDropOptions} from './useDragAndDrop'; export type {DropIndicatorProps, DropIndicatorRenderProps} from './DragAndDrop'; export type {ContextValue, RenderProps, SlotProps, StyleRenderProps} from './utils'; diff --git a/packages/react-aria-components/stories/Dropzone.stories.tsx b/packages/react-aria-components/stories/Dropzone.stories.tsx index 234dfdc5a64..15ee895be47 100644 --- a/packages/react-aria-components/stories/Dropzone.stories.tsx +++ b/packages/react-aria-components/stories/Dropzone.stories.tsx @@ -11,9 +11,9 @@ */ import {action} from '@storybook/addon-actions'; -import {Button, DropZone, FileTrigger, Link, Text} from 'react-aria-components'; +import {Button, DropZone, FileTrigger, Link, Text, useDrag} from 'react-aria-components'; import {classNames} from '@react-spectrum/utils'; -import {FocusRing, mergeProps, useButton, useClipboard, useDrag} from 'react-aria'; +import {FocusRing, mergeProps, useButton, useClipboard} from 'react-aria'; import {Meta, StoryFn, StoryObj} from '@storybook/react'; import React, {useRef} from 'react'; import styles from '../example/index.css';