import { Button, IconButton } from '@chakra-ui/react' import cx from 'classnames' import { File } from '@/client/api/file' import downloadFile from '@/helpers/download-file' import { IconDownload } from '@/lib' export type DrawerDownloadButtonProps = { file: File isCollapsed?: boolean } const DrawerDownloadButton = ({ file, isCollapsed, }: DrawerDownloadButtonProps) => { if (isCollapsed) { return ( } variant="solid" colorScheme="blue" aria-label="Download" title="Download" className={cx('h-[50px]', 'w-[50px]', 'p-1.5', 'rounded-md')} onClick={() => downloadFile(file)} /> ) } else { return ( ) } } export default DrawerDownloadButton