fix: thtumbnail box sizing (#415)
This commit is contained in:
parent
86277a091c
commit
a1bc2db336
1 changed files with 11 additions and 7 deletions
|
@ -58,23 +58,27 @@ function VideoThumbnailPlaceholder({ file, mediaPreview, ...props }) {
|
||||||
return <Placeholder Icon={IconPlayerPlay} text={`Click to view video (${file.name})`} {...props} />;
|
return <Placeholder Icon={IconPlayerPlay} text={`Click to view video (${file.name})`} {...props} />;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box>
|
<Box sx={{ position: 'relative' }}>
|
||||||
<Image
|
<Image
|
||||||
src={file.thumbnail}
|
src={file.thumbnail}
|
||||||
sx={{
|
sx={{
|
||||||
position: 'absolute',
|
|
||||||
width: '100%',
|
width: '100%',
|
||||||
height: '100%',
|
height: 'auto',
|
||||||
objectFit: 'cover',
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Center sx={{ position: 'absolute', width: '100%', height: '100%' }}>
|
<Center
|
||||||
|
sx={{
|
||||||
|
position: 'absolute',
|
||||||
|
height: '100%',
|
||||||
|
top: '50%',
|
||||||
|
left: '50%',
|
||||||
|
transform: 'translate(-50%, -50%)',
|
||||||
|
}}
|
||||||
|
>
|
||||||
<IconPlayerPlay size={48} />
|
<IconPlayerPlay size={48} />
|
||||||
</Center>
|
</Center>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
// </Placeholder>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue