fix: thtumbnail box sizing (#415)

This commit is contained in:
diced 2023-05-30 18:33:15 -07:00
parent 86277a091c
commit a1bc2db336
No known key found for this signature in database
GPG key ID: 370BD1BA142842D1

View file

@ -58,23 +58,27 @@ function VideoThumbnailPlaceholder({ file, mediaPreview, ...props }) {
return <Placeholder Icon={IconPlayerPlay} text={`Click to view video (${file.name})`} {...props} />;
return (
<Box>
<Box sx={{ position: 'relative' }}>
<Image
src={file.thumbnail}
sx={{
position: 'absolute',
width: '100%',
height: '100%',
objectFit: 'cover',
height: 'auto',
}}
/>
<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} />
</Center>
</Box>
// </Placeholder>
);
}