56 lines
1.1 KiB
TypeScript
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>;
|
|
}
|