diff --git a/packages/react/src/views/AttachmentHandler/AttachmentMetadata.js b/packages/react/src/views/AttachmentHandler/AttachmentMetadata.js index 5bd249ce5..390cab7b7 100644 --- a/packages/react/src/views/AttachmentHandler/AttachmentMetadata.js +++ b/packages/react/src/views/AttachmentHandler/AttachmentMetadata.js @@ -3,7 +3,14 @@ import { css } from '@emotion/react'; import { ActionButton, Box } from '@embeddedchat/ui-elements'; import { Markdown } from '../Markdown'; -const AttachmentMetadata = ({ attachment, url, variantStyles = {}, msg }) => { +const AttachmentMetadata = ({ + attachment, + url, + variantStyles = {}, + msg, + onExpandCollapseClick, + isExpanded, +}) => { const handleDownload = async () => { try { const response = await fetch(url); @@ -78,6 +85,16 @@ const AttachmentMetadata = ({ attachment, url, variantStyles = {}, msg }) => { > {attachment.title}

+ { + setIsExpanded((prevState) => !prevState); + }; + return ( -