Skip to content

Commit

Permalink
fix: info modal and list view thumbnails (openedx#636)
Browse files Browse the repository at this point in the history
  • Loading branch information
jesperhodge authored Oct 17, 2023
1 parent 6287e8c commit 618831f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/files-and-uploads/FileThumbnail.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ const AssetThumbnail = ({
<div className="row justify-content-center align-itmes-center">
{thumbnail ? (
<Image
style={{ width: '503px', height: '281px' }}
style={{
width: '503px',
height: '281px',
objectFit: 'contain',
maxWidth: '100%',
maxHeight: '100%',
}}
className="border rounded p-1"
src={src}
alt={`Thumbnail of ${displayName}`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,17 @@ const ThumbnailColumn = ({ row }) => {
return (
<div className="row align-items-center justify-content-center m-0 p-3">
{thumbnail ? (
<Image src={src} style={{ height: '76px', width: '135.71px' }} className="border rounded p-1" />
<Image
src={src}
style={{
height: '76px',
width: '135.71px',
objectFit: 'contain',
maxWidth: '100%',
maxHeight: '100%',
}}
className="border rounded p-1"
/>
) : (
<div className="row border justify-content-center align-items-center rounded m-0" style={{ height: '76px', width: '135.71px' }}>
<Icon src={src} style={{ height: '48px', width: '48px' }} />
Expand Down

0 comments on commit 618831f

Please sign in to comment.