wix-style-react
Version:
wix-style-react
46 lines • 1.88 kB
TypeScript
export default Dropzone;
/** Defines a region in the page where files can be dropped */
declare class Dropzone extends React.PureComponent<any, any, any> {
static displayName: string;
static propTypes: {
/** Applies a data-hook HTML attribute that can be used in the tests. */
dataHook: PropTypes.Requireable<string>;
/** Specifies a CSS class name to be appended to the component’s root element. */
className: PropTypes.Requireable<string>;
/** Defines an event handler which is called when files are dropped over the dropzone. Dropped files are supplied as an argument to the function. */
onDrop: PropTypes.Validator<(...args: any[]) => any>;
/** Accepts `<Dropzone.Overlay />` or `<Dropzone.Content />`. Both of them can contain any required content. */
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
};
static _overrideEventDefaults: (event: any) => void;
constructor(props: any);
constructor(props: any, context: any);
state: {
isDragActive: boolean;
};
/** https://spin.atomicobject.com/2018/09/13/file-uploader-react-typescript/ */
_dragEventCounter: number;
_eventHasFiles: (event: any) => boolean;
_onDragEnter: (event: any) => false | void;
_onDragLeave: (event: any) => false | void;
_onDrop: (event: any) => any;
render(): React.JSX.Element;
}
declare namespace Dropzone {
function Overlay({ children }: {
children: any;
}): React.JSX.Element;
namespace Overlay {
let displayName: string;
}
function Content({ children }: {
children: any;
}): React.JSX.Element;
namespace Content {
let displayName_1: string;
export { displayName_1 as displayName };
}
}
import React from 'react';
import PropTypes from 'prop-types';
//# sourceMappingURL=Dropzone.d.ts.map