-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
started setup page and semester blocks
- Loading branch information
1 parent
1acacf3
commit 0d450a7
Showing
10 changed files
with
228 additions
and
25 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,35 @@ | ||
import { Box } from "@radix-ui/themes"; | ||
import React, { useState } from 'react'; | ||
import { Button } from "@radix-ui/themes"; | ||
import "./semesterblock.css" | ||
|
||
interface SemesterYearProps { | ||
selectedYear: number | string; | ||
}; | ||
|
||
function SemesterBlock({ selectedYear }: SemesterYearProps) { | ||
const [classList, setClassList] = useState<string[]>([]); | ||
|
||
const handleAddClass = () => { | ||
setClassList([...classList, `Class ${classList.length + 1}`]); | ||
}; | ||
return ( | ||
<div className="container"> | ||
<h2 className="title">Fall {selectedYear} <p className="counter">{classList.length}</p></h2> | ||
|
||
<div className="class-list"> | ||
{classList.map((className, index) => ( | ||
<div key={index} className="class-item"> | ||
{className} | ||
</div> | ||
))} | ||
</div> | ||
|
||
<Button onClick={handleAddClass} className="add-button"> | ||
+ Add Class | ||
</Button> | ||
</div> | ||
) | ||
} | ||
|
||
export default SemesterBlock; |
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,24 @@ | ||
@media (max-width: 600px) { | ||
.container { | ||
width: 100%; | ||
} | ||
} | ||
|
||
body { | ||
background-color: white; | ||
} | ||
.container { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
padding: 20px; | ||
background-color: #F8F8F8; | ||
border-radius: 8px; | ||
width: 300px; | ||
margin: 20px auto; | ||
} | ||
|
||
.counter { | ||
background-color: #E7E7E7; | ||
} |
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 @@ | ||
import React, { useState } from 'react'; | ||
import "@radix-ui/themes/styles.css"; | ||
import "./setup.css" | ||
import { Flex, Text, Button, Checkbox } from "@radix-ui/themes"; | ||
import YearDropdown from "./year-dropdown"; | ||
|
||
|
||
function SetUpPage() { | ||
|
||
return ( | ||
<Flex className="container" direction="column" gap="0" width="100%" align="center"> | ||
<Text className="setup">Set Up</Text> | ||
<Text className="enteryear">Enter your start year and graduation year</Text> | ||
|
||
<Flex className= "yearContainer" direction="row" gap="16px" align="center"> | ||
<Flex direction="column"> | ||
<Text>Start Year</Text> | ||
<YearDropdown></YearDropdown> | ||
</Flex> | ||
|
||
<Flex direction="column"> | ||
<Text>Graduation Year</Text> | ||
<YearDropdown></YearDropdown> | ||
</Flex> | ||
</Flex> | ||
|
||
|
||
<Text as="label" size="2"> | ||
<Flex gap="2"> | ||
<Checkbox defaultChecked /> | ||
Include Summer Semesters? | ||
</Flex> | ||
</Text> | ||
<Button>Next</Button> | ||
</Flex> | ||
); | ||
} | ||
|
||
export default SetUpPage; |
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,58 @@ | ||
.container { | ||
width: 500px; | ||
flex-direction: column; | ||
gap: var(--L, 32px); | ||
} | ||
@media (max-width: 600px) { | ||
.container { | ||
width: 100%; | ||
} | ||
} | ||
|
||
body { | ||
background-color: white; | ||
} | ||
|
||
.setup { | ||
color: var(--Primary-Text, #000); | ||
/* Web UI/Heading/Heading Medium */ | ||
font-family: "Inter Variable"; | ||
font-size: 20px; | ||
font-style: normal; | ||
font-weight: 600; | ||
line-height: 24px; /* 120% */ | ||
letter-spacing: -0.2px; | ||
} | ||
|
||
.enteryear { | ||
color: var(--Secondary-Text, #8A8A8A); | ||
/* Web UI/Body/Body Medium */ | ||
font-family: "Inter Variable"; | ||
font-size: 14px; | ||
font-style: normal; | ||
font-weight: 400; | ||
line-height: 20px; /* 142.857% */ | ||
letter-spacing: -0.1px; | ||
} | ||
|
||
.gradYearbox { | ||
background-color: white; | ||
border: 1px solid var(--Gray-2, #C7C7C7); | ||
color: black; | ||
} | ||
|
||
.yearOptions { | ||
color: black; | ||
width: 100%; | ||
} | ||
|
||
.gradOptionsBox { | ||
background-color: white; | ||
width: 206px; | ||
} | ||
|
||
.yearContainer { | ||
justify-content: "space-between"; | ||
width: 100%; | ||
align-items: center; | ||
} |
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,42 @@ | ||
import React, { useState } from 'react'; | ||
import "@radix-ui/themes/styles.css"; | ||
import "./setup.css" | ||
import * as DropdownMenu from '@radix-ui/react-dropdown-menu'; | ||
import { ChevronDownIcon } from '@radix-ui/react-icons'; | ||
|
||
import YearsData from './years.json'; | ||
|
||
function YearDropdown() { | ||
const [gradYear, setGradYear] = useState<string | null>(null); | ||
const { years } = YearsData; | ||
|
||
const handleGradSelect = (year: string) => { | ||
setGradYear(year); | ||
}; | ||
|
||
return ( | ||
<DropdownMenu.Root> | ||
<DropdownMenu.Trigger className='gradYearbox'> | ||
{gradYear ? gradYear : 'Select year'} | ||
<ChevronDownIcon /> | ||
</DropdownMenu.Trigger> | ||
|
||
<DropdownMenu.Portal> | ||
|
||
<DropdownMenu.Content className="gradOptionsBox"> | ||
{years.map((year) => ( | ||
<DropdownMenu.Item | ||
key={year} | ||
onSelect={() => handleGradSelect(year)} | ||
className="yearOptions" | ||
> | ||
{year} | ||
</DropdownMenu.Item> | ||
))} | ||
</DropdownMenu.Content> | ||
</DropdownMenu.Portal> | ||
</DropdownMenu.Root> | ||
) | ||
} | ||
|
||
export default YearDropdown; |
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,14 @@ | ||
{ | ||
"years": [ | ||
"2021", | ||
"2022", | ||
"2023", | ||
"2024", | ||
"2025", | ||
"2026", | ||
"2027", | ||
"2028", | ||
"2029", | ||
"2030" | ||
] | ||
} |
Empty file.