import { Channel, FileAttachment } from 'stream-chat-react-native';
<Channel FileAttachment={() => <FileAttachment attachmentSize={40} />}
This is documentation for
Stream Chat React Native SDK v5, which is nolonger actively maintained. For up-to-date documentation, see the latest version (v6).
FileAttachment
Component to render file attachments within the MessageList
.
Basic Usage
You can customize this component and provide it back to the SDK via the FileAttachment
prop on Channel
if desired.
Changing the size of the file attachment icon can be easily accomplished.
Props
attachment
Attachment object for file
type attachment.
Type |
---|
Object |
attachmentSize
Size of an attachment icon. This value gets passed to FileAttachmentIcon
component.
Type |
---|
Number |
additionalTouchableProps
Additional props provided to the underlying TouchableOpacity used by components within a message such as MessageContent
.
Type |
---|
object |
UI Component Props
AttachmentActions
Component to render additional actions on attachment. for example send, shuffle, cancel in case of Giphy.
Type | Default |
---|---|
ComponentType | AttachmentActions |
FileAttachmentIcon
Component to render file icon for file
type attachment.
Type | Default |
---|---|
ComponentType | FileIcon |