一个简单的网格布局,将参会者方块排列在行和列中,并根据参会者人数自动调整大小。
| 属性 | 类型 | 必填 | 默认值 | 描述 |
|---|---|---|---|---|
meeting |
RealtimeKitClient |
✅ | - | RealtimeKit 会议实例 |
participants |
Peer[] |
✅ | - | 要显示的参会者数组 |
aspectRatio |
string |
❌ | '3:4' |
网格方块的宽高比 |
config |
UIConfig |
❌ | defaultConfig |
UI 配置对象 |
gap |
number |
❌ | 8 |
网格方块之间的间距(以像素为单位) |
iconPack |
IconPack |
❌ | defaultIconPack |
自定义图标包 |
size |
'lg' | 'md' | 'sm' | 'xl' |
❌ | 'sm' |
尺寸变体 |
states |
States |
❌ | - | UI 状态对象 |
t |
RtkI18n |
❌ | - | i18n 翻译函数 |
style |
StyleProp<any> |
❌ | - | 网格容器的自定义样式 |
import { RtkSimpleGrid } from "@cloudflare/realtimekit-react-native-ui";
function MyComponent() {
return <RtkSimpleGrid meeting={meeting} participants={participants} />;
}import { RtkSimpleGrid } from "@cloudflare/realtimekit-react-native-ui";
function MyComponent() {
return (
<RtkSimpleGrid
meeting={meeting}
participants={participants}
aspectRatio="16:9"
gap={12}
size="md"
/>
);
}