Files
lingniu-vehicle-ingest/vehicle-data-platform/apps/web/src/v2/shared/WorkspaceDetailSideSheet.tsx
2026-07-19 05:38:17 +08:00

56 lines
1.1 KiB
TypeScript

import type { ReactNode } from 'react';
import {
WorkspaceSideSheet,
type WorkspaceSideSheetBadgeColor
} from './WorkspaceSideSheet';
type WorkspaceDetailSideSheetProps = {
className?: string;
visible: boolean;
ariaLabel: string;
closeLabel?: string;
title: ReactNode;
description: ReactNode;
badge?: ReactNode;
badgeColor?: WorkspaceSideSheetBadgeColor;
placement?: 'left' | 'right' | 'top' | 'bottom';
width?: string | number;
height?: string | number;
onCancel: () => void;
children: ReactNode;
};
export function WorkspaceDetailSideSheet({
className,
visible,
ariaLabel,
closeLabel,
title,
description,
badge,
badgeColor,
placement,
width,
height,
onCancel,
children
}: WorkspaceDetailSideSheetProps) {
return <WorkspaceSideSheet
className={className}
variant="detail"
visible={visible}
ariaLabel={ariaLabel}
closeLabel={closeLabel}
title={title}
description={description}
badge={badge}
badgeColor={badgeColor}
placement={placement}
width={width}
height={height}
onCancel={onCancel}
>
{children}
</WorkspaceSideSheet>;
}