Skip to content

Commit

Permalink
fixed step 4 styling issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Miyuki-L committed May 9, 2024
1 parent 214b958 commit f43d2ac
Show file tree
Hide file tree
Showing 5 changed files with 329 additions and 301 deletions.
3 changes: 1 addition & 2 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ function App() {
<div className="app-container">
<Routes>
<Route path="/" element={<Layout />}>
<Route index element={<Application path={1} />} />
{/* <Route index element={<Candidates />} /> */}
<Route index element={<Candidates />} />
<Route path="path1" element={<Application path={1} />} />
<Route path="path2" element={<Application path={2} />} />
<Route path="path3" element={<Application path={3} />} />
Expand Down
8 changes: 1 addition & 7 deletions frontend/src/components/Dropdown.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
font-size: 16px;
color: var(--color-ccidc-placeholder);
height: 40px;
width: 460px;

border-radius: 4px;
border: 1px solid #d8d8d8;
background-image: url("../assets/dropDownIcon.svg");
Expand Down Expand Up @@ -45,9 +45,3 @@
.dpItem:hover {
background-color: #ebebeb;
}

@media (max-width: 1250px) {
.dropDown {
width: 330px;
}
}
70 changes: 34 additions & 36 deletions frontend/src/components/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,42 +17,40 @@ export function Dropdown(props: {
};

return (
<>
<div
className={styles.dropDown}
onClick={() => {
setIsActive(!isActive);
}}
role="button"
tabIndex={0}
onKeyDown={() => {
setIsActive(!isActive);
}}
>
<div className={selected === "Select One" ? styles.selectOne : styles.selectedOption}>
{selected ?? "Select One"}
</div>
{isActive && (
<div className={styles.dpContent}>
{props.options.map((option, index) => (
<div
onClick={() => {
handleOptionClick(option);
}}
className={styles.dpItem}
role="button"
tabIndex={0}
key={index}
onKeyDown={() => {
setIsActive(!isActive);
}}
>
{option}
</div>
))}
</div>
)}
<div
className={styles.dropDown}
onClick={() => {
setIsActive(!isActive);
}}
role="button"
tabIndex={0}
onKeyDown={() => {
setIsActive(!isActive);
}}
>
<div className={selected === "Select One" ? styles.selectOne : styles.selectedOption}>
{selected ?? "Select One"}
</div>
</>
{isActive && (
<div className={styles.dpContent}>
{props.options.map((option, index) => (
<div
onClick={() => {
handleOptionClick(option);
}}
className={styles.dpItem}
role="button"
tabIndex={0}
key={index}
onKeyDown={() => {
setIsActive(!isActive);
}}
>
{option}
</div>
))}
</div>
)}
</div>
);
}
Loading

0 comments on commit f43d2ac

Please sign in to comment.