style: show entire image preview in room timeline
This commit is contained in:
parent
9ecb233763
commit
77ab3fba1e
3 changed files with 5 additions and 5 deletions
|
@ -9,7 +9,7 @@ export const Attachment = recipe({
|
|||
borderRadius: config.radii.R400,
|
||||
overflow: 'hidden',
|
||||
maxWidth: '100%',
|
||||
width: toRem(400),
|
||||
// width: toRem(400),
|
||||
},
|
||||
variants: {
|
||||
outlined: {
|
||||
|
@ -31,7 +31,7 @@ export const AttachmentBox = style([
|
|||
{
|
||||
maxWidth: '100%',
|
||||
maxHeight: toRem(600),
|
||||
width: toRem(400),
|
||||
// width: toRem(400),
|
||||
overflow: 'hidden',
|
||||
},
|
||||
]);
|
||||
|
|
|
@ -1100,13 +1100,13 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli
|
|||
if (typeof mxcUrl !== 'string') {
|
||||
return null;
|
||||
}
|
||||
const height = scaleYDimension(imgInfo?.w || 400, 400, imgInfo?.h || 400);
|
||||
// const height = scaleYDimension(imgInfo?.w || 400, 400, imgInfo?.h || 400);
|
||||
|
||||
return (
|
||||
<Attachment>
|
||||
<AttachmentBox
|
||||
style={{
|
||||
height: toRem(height < 48 ? 48 : height),
|
||||
// height: toRem(height < 48 ? 48 : height),
|
||||
}}
|
||||
>
|
||||
<ImageContent
|
||||
|
|
|
@ -121,7 +121,7 @@ export const ImageContent = as<'div', ImageContentProps>(
|
|||
</Box>
|
||||
)}
|
||||
{srcState.status === AsyncStatus.Success && (
|
||||
<Box className={css.AbsoluteContainer}>
|
||||
<Box className={css.AbsoluteContainer} style={{position: 'unset'}}>
|
||||
<Image
|
||||
alt={body}
|
||||
title={body}
|
||||
|
|
Loading…
Reference in a new issue