diff --git a/components/core/ObjectPreview/ObjectPreviewPrimitive.js b/components/core/ObjectPreview/ObjectPreviewPrimitive.js index 616077cf..b8b1ad75 100644 --- a/components/core/ObjectPreview/ObjectPreviewPrimitive.js +++ b/components/core/ObjectPreview/ObjectPreviewPrimitive.js @@ -23,12 +23,20 @@ const STYLES_DESCRIPTION = (theme) => css` border-radius: 0px 0px 16px 16px; box-sizing: border-box; width: 100%; - padding: 9px 16px 8px; + max-height: 61px; @media (max-width: ${theme.sizes.mobile}px) { padding: 8px; } `; + +const STYLES_DESCRIPTION_INNER = (theme) => css` + background-color: ${theme.semantic.bgLight}; + padding: 9px 16px 8px; + border-radius: 16px; + height: calc(170px + 61px); +`; + const STYLES_PREVIEW = css` overflow: hidden; `; @@ -60,10 +68,16 @@ export default function ObjectPreviewPrimitive({ }) { const { like, isLiked, likeCount } = useLikeHandler({ file, viewer }); const { save, isSaved, saveCount } = useSaveHandler({ file, viewer }); + const showSaveButton = viewer?.id !== file?.ownerId; - const [showControls, setShowControls] = React.useState(false); - const showControlsVisibility = () => setShowControls(true); - const hideControlsVisibility = () => setShowControls(false); + const [areControlsVisible, setShowControls] = React.useState(false); + const showControls = () => setShowControls(true); + const hideControls = () => setShowControls(false); + + const [isBodyVisible, setShowBody] = React.useState(false); + const showBody = () => setShowBody(true); + const hideBody = () => setShowBody(false); + const body = file?.data?.body; const title = file.data.name || file.filename; @@ -78,11 +92,9 @@ export default function ObjectPreviewPrimitive({ /> ); } - const showSaveButton = viewer?.id !== file?.ownerId; + return (