-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rebasing
- Loading branch information
Showing
10 changed files
with
169 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
'use client'; | ||
|
||
import Modal from 'react-modal'; | ||
import { SubHeading2 } from '@/styles/texts'; | ||
import { Project } from '../../types/schema'; | ||
import ProjectItem from '../ProjectItem'; | ||
import { | ||
AllProjectsHeader, | ||
modalContentStyles, | ||
modalOverlayStyles, | ||
ProjectDetails, | ||
} from './styles'; | ||
|
||
export default function AllProjectsModal({ | ||
projects, | ||
}: { | ||
projects: Project[] | null; | ||
}) { | ||
const projectItems = projects?.map((project: Project) => { | ||
return <ProjectItem key={project.id} project_id={project.id} />; | ||
}); | ||
|
||
return ( | ||
<Modal | ||
isOpen={true} | ||
style={{ | ||
overlay: modalOverlayStyles, | ||
content: modalContentStyles, | ||
}} | ||
> | ||
<ProjectDetails> | ||
<AllProjectsHeader> | ||
<SubHeading2>ALL PROJECTS</SubHeading2> | ||
</AllProjectsHeader> | ||
{projectItems} | ||
</ProjectDetails> | ||
</Modal> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { CSSProperties } from 'react'; | ||
import styled from 'styled-components'; | ||
import COLORS from '@/styles/colors'; | ||
|
||
export const modalOverlayStyles: CSSProperties = { | ||
width: '21.25rem', | ||
height: '100%', | ||
backgroundColor: 'transparent', | ||
}; | ||
|
||
export const modalContentStyles: CSSProperties = { | ||
display: 'flex', | ||
top: '5.3125rem', | ||
left: '1.25rem', | ||
width: '90vw', | ||
maxWidth: '22.25rem', | ||
height: '85vh', | ||
borderRadius: 'var(--Spacing-Small, 16px)', | ||
border: '0.75px solid var(--WorldPeas-White, #fff)', | ||
background: | ||
'linear-gradient(180deg, rgba(250, 250, 250, 0.32) 0%, rgba(238, 238, 238, 0.65) 100%)', | ||
backdropFilter: 'blur(7.5px)', | ||
paddingTop: '0.625rem', | ||
paddingBottom: '0.625rem', | ||
boxSizing: 'border-box', | ||
flexDirection: 'column', | ||
alignItems: 'center', | ||
}; | ||
|
||
export const ProjectDetails = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
border-radius: var(--Spacing-Small, 16px); | ||
height: 100%; | ||
background: ${COLORS.white}; | ||
width: 21.25rem; | ||
overflow-y: auto; | ||
gap: 0.75rem; | ||
padding-bottom: 0.8125rem; | ||
`; | ||
|
||
export const AllProjectsHeader = styled.div` | ||
display: flex; | ||
justify-content: space-between; | ||
margin-top: 1.4375rem; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters