From 20d60b939a7ef1242b91b1515ddaedc8df447bb7 Mon Sep 17 00:00:00 2001 From: Bastien Chanot Date: Sat, 23 May 2026 22:17:42 +0200 Subject: [PATCH] feat(ui): add LateralityPicker modal component Co-Authored-By: Claude --- .../observation/LateralityPicker.tsx | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 src/components/observation/LateralityPicker.tsx diff --git a/src/components/observation/LateralityPicker.tsx b/src/components/observation/LateralityPicker.tsx new file mode 100644 index 00000000..3d3547e3 --- /dev/null +++ b/src/components/observation/LateralityPicker.tsx @@ -0,0 +1,62 @@ +import Dialog from '@/components/ui/Dialog' +import Button from '@/components/ui/Button' +import type { LateralSide } from '@/domain/schema/observation' +import { useT } from '@/i18n/useT' + +export interface LateralityPickerProps { + open: boolean + onClose: () => void + onSelect: (sides: LateralSide[]) => void + title: string + existingSides: LateralSide[] +} + +export default function LateralityPicker({ + open, + onClose, + onSelect, + title, + existingSides, +}: LateralityPickerProps) { + const t = useT() + const hasLeft = existingSides.includes('left') + const hasRight = existingSides.includes('right') + + return ( + +
+

+ {t('lateral.which_side')} +

+
+ + + +
+
+
+ ) +}