44 lines
1.1 KiB
TypeScript
44 lines
1.1 KiB
TypeScript
import Dialog from '@/components/ui/Dialog'
|
|
import AnatomyCanvas from './AnatomyCanvas'
|
|
import type { ViewStates } from '@/anatomy/drawing'
|
|
import type { SheetIndex } from '@/services/sheetIndex'
|
|
import { useT } from '@/i18n/useT'
|
|
|
|
export interface DetailModalProps {
|
|
open: boolean
|
|
onClose: () => void
|
|
index: SheetIndex
|
|
viewId: string
|
|
title: string
|
|
states: ViewStates
|
|
onZoneClick: (annotationId: string, viewId: string) => void
|
|
}
|
|
|
|
/** A detail view of the sheet (a crop or its own drawing) in a dialog. */
|
|
export default function DetailModal({
|
|
open,
|
|
onClose,
|
|
index,
|
|
viewId,
|
|
title,
|
|
states,
|
|
onZoneClick,
|
|
}: DetailModalProps) {
|
|
const t = useT()
|
|
return (
|
|
<Dialog open={open} onClose={onClose} title={title} size="xl">
|
|
<div className="aspect-[4/3] w-full">
|
|
<AnatomyCanvas
|
|
index={index}
|
|
viewId={viewId}
|
|
states={states}
|
|
onZoneClick={onZoneClick}
|
|
/>
|
|
</div>
|
|
<p className="mt-4 text-sm text-[var(--color-ink-muted)]">
|
|
{t('detail.click_to_add')}
|
|
</p>
|
|
</Dialog>
|
|
)
|
|
}
|