Skip to content

Commit

Permalink
Set link size to fit content, changed a tag to link component
Browse files Browse the repository at this point in the history
  • Loading branch information
benjdelt committed Nov 20, 2019
1 parent da4da44 commit 7d5a76d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/components/FileInfo/FileInfo.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from 'react'
import { availableGlyphs } from '../Icons'
import { bytesToSize } from '../ImageInput/ImageInput'
import { Link } from 'src/components/Links'
import { IUploadedFileMeta } from 'src/stores/storage'
import { FileDetails } from './FileDetails'

Expand Down Expand Up @@ -46,9 +47,14 @@ export class FileInfo extends React.Component<IProps, IState> {
return (
<>
{allowDownload && meta.downloadUrl ? (
<a href={meta.downloadUrl} target="_blank" download={file.name}>
<Link
href={meta.downloadUrl}
target="_blank"
download={file.name}
sx={{ width: '300px' }}
>
<FileDetails file={file} glyph={glyph} size={size} />
</a>
</Link>
) : (
<FileDetails file={file} glyph={glyph} size={size} />
)}
Expand Down

0 comments on commit 7d5a76d

Please sign in to comment.