Skip to content

Commit

Permalink
refact: dropdown 컴포넌트명 PascalCase로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
2NNS-V committed Sep 4, 2024
1 parent a1324a9 commit def6482
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/components/form/Dropdown.style.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import styled from "@emotion/styled";
import { Dropdown } from "primereact/dropdown";

interface DropdownProps {
interface DropDownProps {
color: string;
width: string;
height: string;
}

export const DropdownWrapper = styled.div<DropdownProps>`
export const DropDownWrapper = styled.div<DropDownProps>`
display: flex;
border-radius: 12px;
justify-content: center;
Expand All @@ -27,7 +27,7 @@ export const DropdownWrapper = styled.div<DropdownProps>`
width: ${(props) => props.width};
`;

export const DropdownContainer = styled(Dropdown)`
export const DropDownContainer = styled(Dropdown)`
width: 100%;
font-size: 15px;
justify-content: center;
Expand Down
10 changes: 5 additions & 5 deletions src/components/form/Dropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";

import { DropdownWrapper, DropdownContainer, LabelContainer } from "./Dropdown.style";
import { DropDownWrapper, DropDownContainer, LabelContainer } from "./DropDown.style";

Check failure on line 3 in src/components/form/Dropdown.tsx

View workflow job for this annotation

GitHub Actions / e2e

Cannot find module './DropDown.style' or its corresponding type declarations.

interface DropdownProps {
color: string;
Expand All @@ -10,7 +10,7 @@ interface DropdownProps {
setSelectedMajor: React.Dispatch<React.SetStateAction<string>>;
}

export default function dropdown({ color, width, height, selectedMajor, setSelectedMajor }: DropdownProps) {
export default function DropDown({ color, width, height, selectedMajor, setSelectedMajor }: DropdownProps) {
const majors = [
{ label: "📖 인문대학", value: "인문대학" },
{ label: "📋 사회과학대학", value: "사회과학대학" },
Expand All @@ -35,15 +35,15 @@ export default function dropdown({ color, width, height, selectedMajor, setSelec
];

return (
<DropdownWrapper color={color} width={width} height={height}>
<DropdownContainer
<DropDownWrapper color={color} width={width} height={height}>
<DropDownContainer
value={selectedMajor}
onChange={(e) => setSelectedMajor(e.value)}

Check failure on line 41 in src/components/form/Dropdown.tsx

View workflow job for this annotation

GitHub Actions / e2e

Parameter 'e' implicitly has an 'any' type.
options={majors}
optionLabel="label"
placeholder="단과 대학을 선택하세용"
itemTemplate={(option) => <LabelContainer color={color}>{option.label}</LabelContainer>}

Check failure on line 45 in src/components/form/Dropdown.tsx

View workflow job for this annotation

GitHub Actions / e2e

Parameter 'option' implicitly has an 'any' type.
/>
</DropdownWrapper>
</DropDownWrapper>
);
}
4 changes: 2 additions & 2 deletions src/pages/AnalyticsPage.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { useNavigate } from "react-router-dom";

import Dropdown from "@/components/form/Dropdown";
import DropDown from "@/components/form/DropDown";

Check failure on line 4 in src/pages/AnalyticsPage.tsx

View workflow job for this annotation

GitHub Actions / e2e

Cannot find module '@/components/form/DropDown' or its corresponding type declarations.
import { AppBar } from "@/components/navigation/AppBar";
import { Text } from "@/components/typography";

Expand Down Expand Up @@ -45,7 +45,7 @@ export default function AnalyticsPage() {

<TitleContainer>
<TitleTop>
<Dropdown
<DropDown
color="secondary"
width="100%"
height="40px"
Expand Down
4 changes: 2 additions & 2 deletions src/pages/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useNavigate } from "react-router-dom";

import Footer from "@/components/display/Footer";
import { Button } from "@/components/form/Button";
import Dropdown from "@/components/form/Dropdown";
import DropDown from "@/components/form/DropDown";

Check failure on line 6 in src/pages/HomePage.tsx

View workflow job for this annotation

GitHub Actions / e2e

Cannot find module '@/components/form/DropDown' or its corresponding type declarations.
import { Input } from "@/components/form/Input";
import { SideBar } from "@/components/navigation/SideBar";
import { Text } from "@/components/typography/Text";
Expand Down Expand Up @@ -86,7 +86,7 @@ export default function HomePage() {
value={name}
onChange={(e) => setName(e.currentTarget.value)}
/>
<Dropdown
<DropDown
color="primary"
width="242px"
height="30px"
Expand Down

0 comments on commit def6482

Please sign in to comment.