11
11
*/
12
12
13
13
import { AriaLabelingProps } from '@react-types/shared' ;
14
- import { ContextValue , Provider , RenderProps , SlotProps , useContextProps , useRenderProps , useSlot } from './utils' ;
14
+ import { ContextValue , Provider , RenderProps , SlotProps , useContextProps , useRenderProps } from './utils' ;
15
15
import { DropOptions , mergeProps , useClipboard , useDrop , useFocusRing , useHover , useId , VisuallyHidden } from 'react-aria' ;
16
16
import { FileTriggerContext } from './FileTrigger' ;
17
17
import { filterDOMProps , useLabels } from '@react-aria/utils' ;
@@ -40,7 +40,7 @@ export interface DropZoneRenderProps {
40
40
*/
41
41
isDropTarget : boolean
42
42
}
43
- // note: possibly add isDisabled prop in the future
43
+
44
44
export interface DropZoneProps extends Omit < DropOptions , 'getDropOperationForPoint' > , RenderProps < DropZoneRenderProps > , SlotProps , AriaLabelingProps { }
45
45
46
46
export const DropZoneContext = createContext < ContextValue < DropZoneProps , HTMLDivElement > > ( null ) ;
@@ -51,7 +51,6 @@ function DropZone(props: DropZoneProps, ref: ForwardedRef<HTMLDivElement>) {
51
51
let { dropProps, dropButtonProps, isDropTarget} = useDrop ( { ...props , ref : buttonRef , hasDropButton : true } ) ;
52
52
let { hoverProps, isHovered} = useHover ( { } ) ;
53
53
let { focusProps, isFocused, isFocusVisible} = useFocusRing ( ) ;
54
- let [ fileTriggerRef ] = useSlot ( ) ;
55
54
56
55
let textId = useId ( ) ;
57
56
let labelProps = useLabels ( { 'aria-labelledby' : textId } ) ;
@@ -77,7 +76,7 @@ function DropZone(props: DropZoneProps, ref: ForwardedRef<HTMLDivElement>) {
77
76
return (
78
77
< Provider
79
78
values = { [
80
- [ FileTriggerContext , { ref : fileTriggerRef } ] ,
79
+ [ FileTriggerContext , { } ] ,
81
80
[ TextContext , { id : textId , slot : 'heading' } ]
82
81
] } >
83
82
{ /* eslint-disable-next-line */ }
0 commit comments