跳转到内容
搜索文档

RtkFilePickerButton

最后更新 查看 MarkdownAgent 设置

属性

属性 类型 必填 默认值 描述
filter string - 打开文件选择器时使用的文件类型过滤器
icon keyof IconPack1 - 图标
iconPack IconPack1 defaultIconPack 图标包
label string - 工具提示标签
t RtkI18n1 useLanguage() 语言

使用示例

基本用法

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

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

带属性用法

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

function MyComponent() {
  return (
    <RtkFilePickerButton
      filter="example"
      icon={defaultIconPack}
      label="example"
    />
  );
}

这篇文档对您有帮助吗?