-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathProjectDetailView.tsx
More file actions
45 lines (43 loc) · 1.24 KB
/
Copy pathProjectDetailView.tsx
File metadata and controls
45 lines (43 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import React from 'react';
import Box from '@mui/material/Box';
import { ProjectTitle } from './ProjectTitle';
import { ProjectInfo } from './ProjectInfo';
import type { ProjectData } from '@/types/project';
/**
* Props for the ProjectDetailView component
*/
interface ProjectDetailViewProps {
project: ProjectData;
onClose: () => void;
}
/**
* Container component that orchestrates the project detail panels.
* Rendered below the map when a marker is clicked. Combines
* ProjectTitle (header bar) and ProjectInfo (left/right data panels).
*
* @component
*/
export const ProjectDetailView: React.FC<ProjectDetailViewProps> = ({ project, onClose }) => {
return (
<Box
sx={{
width: '100%',
backgroundColor: '#FFFFFF',
borderTop: '2px solid #E8E8E8',
animation: 'slideUp 0.3s ease-out',
'@keyframes slideUp': {
from: { opacity: 0, transform: 'translateY(20px)' },
to: { opacity: 1, transform: 'translateY(0)' },
},
}}
data-testid="project-detail-view"
>
<ProjectTitle
title={project.title}
onClose={onClose}
onSave={() => console.log(`Bookmarked: ${project.title}`)}
/>
<ProjectInfo project={project} />
</Box>
);
};