import React from 'react'; import { Box, IconButton, Loader, Tooltip } from '@wix/design-system'; import { DownloadImportSmall } from '@wix/wix-ui-icons-common'; import { File } from './FileProps'; import { useDownloadFile } from './useDownloadFile'; import { useWixPatternsContainer } from '@wix/bex-core/react'; interface DownloadButtonProps { file: File; } export function DownloadButton({ file }: DownloadButtonProps) { const { downloadFile, isDownloading } = useDownloadFile({ file }); const { translate: t } = useWixPatternsContainer(); return ( {isDownloading ? ( ) : ( ) => { e.stopPropagation(); downloadFile(); }} > )} ); }