Skip to main content

Document

Overview

LMDocument is a component designed for rendering document attachments within a post or media feed. It provides the ability to display information about the document, such as the filename and size, and includes functionality to handle document downloads or view actions. This component can be customized to display various document types and offers user interactions for document-related actions, such as opening or removing the document.

LMFeedPostLinkCell

Callbacks

  • onTap: Callback to handle tap events trigerred by on clicking on the attached document.
  • onCancel: Callback to handle tap events trigerred by on clicking of the cancel button.

Customisation

PropertyTypeDescription
documentIconLMIconPropsCustomization for the document icon.
defaultIconSizenumberDefault size of the document icon.
showPageCountbooleanWhether to display the page count of the document.
showDocumentSizebooleanWhether to show the size of the document.
showDocumentFormatbooleanWhether to display the format (file type) of the document.
documentTitleStyleTextStyleStyle for the document title text.
documentDetailStyleTextStyleStyle for the document detail text (e.g., size or format).
documentViewStyleViewStyleStyle for the overall document view container.
onTapFunctionFunction to trigger when the document is tapped.
showCancelbooleanWhether to show the cancel button for the document view.
onCancelFunctionFunction to trigger when the cancel button is pressed.
showMoreTextbooleanWhether to display additional text, such as "Show More".
showMoreTextStyleTextStyleStyle for the "Show More" text.
cancelButtonCancelButtonObject to customize the cancel button (see table below).

CancelButton Object

PropertyTypeDescription
textLMTextPropsCustomization for the text in the cancel button.
iconLMIconPropsCustomization for the icon in the cancel button.
onTapFunctionFunction triggered when the cancel button is tapped.
placementstart or endPosition of the icon or text in the cancel button.
buttonStyleViewStyleStyle for the cancel button container.
isClickablebooleanDetermines if the cancel button is clickable.