import clsx from 'clsx'; import React, { useRef } from 'react'; import { FormattedMessage } from 'react-intl'; import { Avatar, Icon, HStack } from 'soapbox/components/ui'; import { useDraggedFiles } from 'soapbox/hooks'; interface IMediaInput { className?: string src: string | undefined accept: string onChange: (files: FileList | null) => void disabled?: boolean } const AvatarPicker = React.forwardRef(({ className, src, onChange, accept, disabled }, ref) => { const picker = useRef(null); const { isDragging, isDraggedOver } = useDraggedFiles(picker, (files) => { onChange(files); }); return ( ); }); export default AvatarPicker;