@@ -20,7 +20,7 @@ import React, {ReactNode} from 'react';
20
20
import styles from '@adobe/spectrum-css-temp/components/dropzone/vars.css' ;
21
21
import { useLocalizedStringFormatter } from '@react-aria/i18n' ;
22
22
23
- export interface SpectrumDropZoneProps extends DropZoneProps , DOMProps , StyleProps , AriaLabelingProps {
23
+ export interface SpectrumDropZoneProps extends Omit < DropZoneProps , 'onHoverStart' | 'onHoverChange' | 'onHoverEnd' > , DOMProps , StyleProps , AriaLabelingProps {
24
24
/** The content to display in the drop zone. */
25
25
children : ReactNode ,
26
26
/** Whether the drop zone has been filled. */
@@ -29,6 +29,13 @@ export interface SpectrumDropZoneProps extends DropZoneProps, DOMProps, StylePro
29
29
replaceMessage ?: string
30
30
}
31
31
32
+ // Filter out props used by RAC DropZone that we don't want in RSP DropZone for now.
33
+ let filterProps = ( props ) => {
34
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
35
+ let { onHoverStart, onHoverChange, onHoverEnd, ...otherProps } = props ;
36
+ return otherProps ;
37
+ } ;
38
+
32
39
function DropZone ( props : SpectrumDropZoneProps , ref : DOMRef < HTMLDivElement > ) {
33
40
let { children, isFilled, replaceMessage, ...otherProps } = props ;
34
41
let { styleProps} = useStyleProps ( props ) ;
@@ -38,7 +45,7 @@ function DropZone(props: SpectrumDropZoneProps, ref: DOMRef<HTMLDivElement>) {
38
45
39
46
return (
40
47
< RACDropZone
41
- { ...mergeProps ( otherProps ) }
48
+ { ...mergeProps ( filterProps ( otherProps ) ) }
42
49
{ ...styleProps as Omit < React . HTMLAttributes < HTMLElement > , 'onDrop' > }
43
50
aria-labelledby = { isFilled && messageId }
44
51
className = {
0 commit comments