1
0
mirror of https://github.com/SomboChea/ui synced 2026-01-20 01:55:56 +07:00

ActionBar Component - Replaced class by func. comp (#330)

This commit is contained in:
Priscila Oliveira
2019-12-03 09:44:44 +01:00
committed by GitHub
parent fcad6fa794
commit 742971db0d
11 changed files with 297 additions and 218 deletions

View File

@@ -9,7 +9,7 @@ import fileSizeSI from '../../utils/file-size';
import { formatDate, formatDateDistance } from '../../utils/package';
import Tooltip from '../../muiComponents/Tooltip';
import { isURL } from '../../utils/url';
import { downloadHandler } from '../ActionBar/ActionBar';
import { downloadTarball } from '../ActionBar';
import ListItem from '../../muiComponents/ListItem';
import Grid from '../../muiComponents/Grid';
@@ -140,7 +140,7 @@ const Package: React.FC<PackageInterface> = ({
dist.tarball &&
isURL(dist.tarball) && (
// eslint-disable-next-line
<a onClick={() => downloadHandler(dist.tarball.replace(`https://registry.npmjs.org/`, window.location.href))} target={'_blank'}>
<a onClick={downloadTarball(dist.tarball.replace(`https://registry.npmjs.org/`, window.location.href))} target={'_blank'}>
<Tooltip aria-label={'Download the tar file'} title={'Download tarball'}>
<IconButton aria-label={'Download'}>
{/* eslint-disable-next-line react/jsx-max-depth */}