用于构建自定义控制栏按钮的骨架组件。
| 属性 | 类型 | 是否必填 | 默认值 | 描述 |
|---|---|---|---|---|
brandIcon |
boolean |
✅ | - | 图标是否需要品牌颜色 |
disabled |
boolean |
✅ | - | 按钮是否禁用 |
icon |
string |
✅ | - | 图标 |
iconPack |
IconPack |
❌ | defaultIconPack |
图标包 |
isLoading |
boolean |
✅ | - | 加载状态。如果为 true,则忽略当前图标并显示加载动画(spinner) |
label |
string |
✅ | - | 按钮标签 |
showWarning |
boolean |
✅ | - | 是否显示警告图标 |
size |
Size |
✅ | - | 大小 |
variant |
ControlBarVariant1 |
✅ | - | 变体 |
import { RtkControlbarButton } from '@cloudflare/realtimekit-react-ui';
function MyComponent() {
return <RtkControlbarButton />;
}import { RtkControlbarButton } from '@cloudflare/realtimekit-react-ui';
function MyComponent() {
return (
<RtkControlbarButton
brandIcon={true}
disabled={true}
icon="example"
/>
);
}