跳转到内容
搜索文档

RtkDraftAttachmentView

最后更新 查看 MarkdownAgent 设置

一个用于渲染待发送草稿附件的组件。

属性

属性 类型 必填 默认值 描述
attachment { type: 'image' | 'file'; file: File; } - 要显示的附件
iconPack IconPack1 defaultIconPack 图标包
t RtkI18n1 useLanguage() 语言

使用示例

基本用法

import { RtkDraftAttachmentView } from '@cloudflare/realtimekit-react-ui';

function MyComponent() {
  return <RtkDraftAttachmentView />;
}

带属性用法

import { RtkDraftAttachmentView } from '@cloudflare/realtimekit-react-ui';

function MyComponent() {
  return (
    <RtkDraftAttachmentView
      attachment={{}}
    />
  );
}

这篇文档对您有帮助吗?