Files
Genarrative/src/components/common/PlatformBatchActionToolbar.tsx
T
kdletters 83ebda4dc2 抽取平台批量操作工具栏
新增 PlatformBatchActionToolbar 和组件测试

项目页选择模式底部工具栏复用平台批量工具栏

更新 TRACKING 记录批量操作组件收口
2026-06-14 02:09:41 +08:00

34 lines
735 B
TypeScript

import type { HTMLAttributes, ReactNode } from 'react';
type PlatformBatchActionToolbarProps = Omit<
HTMLAttributes<HTMLDivElement>,
'children'
> & {
children: ReactNode;
label?: string;
};
/**
* 平台批量操作浮动工具栏。
* 只统一容器 chrome 与 toolbar 语义,具体选择逻辑和动作按钮由业务组件传入。
*/
export function PlatformBatchActionToolbar({
children,
label = '批量操作',
className,
...divProps
}: PlatformBatchActionToolbarProps) {
return (
<div
{...divProps}
className={['platform-batch-action-toolbar', className]
.filter(Boolean)
.join(' ')}
role="toolbar"
aria-label={label}
>
{children}
</div>
);
}