diff --git a/acoountbook/src/components/home/month/Month.jsx b/acoountbook/src/components/home/month/Month.jsx
index 60630bc..d1001b3 100644
--- a/acoountbook/src/components/home/month/Month.jsx
+++ b/acoountbook/src/components/home/month/Month.jsx
@@ -4,10 +4,17 @@ import MonthItem from "./MonthItem";
export default function Month() {
const months = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
+ const [selected, setSelected] = useState();
+
return (
{months.map((month) => (
-
+ setSelected(month)}
+ />
))}
);
diff --git a/acoountbook/src/components/home/month/MonthItem.jsx b/acoountbook/src/components/home/month/MonthItem.jsx
index b5a739f..3c82ba4 100644
--- a/acoountbook/src/components/home/month/MonthItem.jsx
+++ b/acoountbook/src/components/home/month/MonthItem.jsx
@@ -1,5 +1,9 @@
import * as M from "./MonthItem.style";
-export default function MonthItem({ month }) {
- return {month}월;
+export default function MonthItem({ month, isSelected, onClick }) {
+ return (
+
+ {month}월
+
+ );
}
diff --git a/acoountbook/src/components/home/month/MonthItem.style.js b/acoountbook/src/components/home/month/MonthItem.style.js
index 5f57388..fdb4ecc 100644
--- a/acoountbook/src/components/home/month/MonthItem.style.js
+++ b/acoountbook/src/components/home/month/MonthItem.style.js
@@ -10,7 +10,8 @@ export const Button = styled.button`
font-size: 18px;
font-weight: 600;
- background-color: #f5f5f5;
+ background-color: ${(props) => (props.isSelected ? "#92b1d4" : "#f5f5f5")};
+ color: ${(props) => (props.isSelected ? "white" : "black")};
&:hover {
color: white;