From 6d2006322e19f1c42d8fa9aa7cc3a33a78a934aa Mon Sep 17 00:00:00 2001 From: ej070961 Date: Sun, 28 Apr 2024 00:55:55 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EA=B1=B8=EC=9D=8C=EB=82=98=EB=88=94?= =?UTF-8?q?=ED=84=B0=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=8A=AC=EB=9D=BC?= =?UTF-8?q?=EC=9D=B4=EB=8D=94=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20?= =?UTF-8?q?=EA=B5=AC=ED=98=84=20(#21)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Community/CourseDetail.tsx | 33 ++++++++ src/components/Community/Drawer.tsx | 56 +++++++++++-- src/components/Community/Review.tsx | 74 ++++++++++++++++++ src/components/Community/UserTrailMap.tsx | 10 ++- src/components/Header.tsx | 6 +- src/styles/drawer.style.ts | 95 ++++++++++++++++++++++- src/styles/header.style.ts | 4 +- 7 files changed, 265 insertions(+), 13 deletions(-) create mode 100644 src/components/Community/CourseDetail.tsx create mode 100644 src/components/Community/Review.tsx diff --git a/src/components/Community/CourseDetail.tsx b/src/components/Community/CourseDetail.tsx new file mode 100644 index 0000000..fececbf --- /dev/null +++ b/src/components/Community/CourseDetail.tsx @@ -0,0 +1,33 @@ +import React from 'react'; +import styled from 'styled-components'; +function CourseDetail() { + return ( + + 코스 소개 + + 노원구 동네에서 걷기 좋은 산책로 추천드립니당 + + 사용자 등록 사진 + + ); +} + +export default CourseDetail; + +const DetailLayout = styled.div` + width: 100%; + display: flex; + flex-direction: column; + padding: 15px 20px; + cursor: default; + + .detail-title { + ${(props) => props.theme.fonts.text_md}; + color: ${(props) => props.theme.colors.gray700}; + } + .detail-text { + ${(props) => props.theme.fonts.text_sm}; + color: ${(props) => props.theme.colors.gray400}; + margin: 5px 0 15px 0; + } +`; diff --git a/src/components/Community/Drawer.tsx b/src/components/Community/Drawer.tsx index 434e22d..c6f9cef 100644 --- a/src/components/Community/Drawer.tsx +++ b/src/components/Community/Drawer.tsx @@ -1,8 +1,54 @@ -import React from 'react'; -import { DrawerLayout } from '../../styles/drawer.style'; - -function Drawer() { - return ; +import React, { useState } from 'react'; +import * as D from '../../styles/drawer.style'; +import TimeIcon from '../../assets/icons/time-icon'; +import HeartIcon from '../../assets/icons/heart-icon'; +import LengthIcon from '../../assets/icons/length-icon'; +import LevelIcon from '../../assets/icons/level-icon'; +import DefaultProfileImg from '../../assets/image/default-profile.png'; +import CourseDetail from './CourseDetail'; +import Review from './Review'; +type DrawerProps = { + isOpenDrawer: boolean; + setIsOpenDrawer: (value: boolean) => void; +}; +function Drawer({ isOpenDrawer, setIsOpenDrawer }: DrawerProps) { + const [selectedMenu, setSelectedMenu] = useState('상세정보'); + return ( + + + 노원구 최애 산책길 + 서울특별시 노원구 +
+ + 1시간 + + 15 + + 2.51km + + 초급 +
+
+ profile + 응자 +
+
+
+ + + + + + + + + {selectedMenu == '상세정보' ? : } +
+ ); } export default Drawer; diff --git a/src/components/Community/Review.tsx b/src/components/Community/Review.tsx new file mode 100644 index 0000000..9e0246e --- /dev/null +++ b/src/components/Community/Review.tsx @@ -0,0 +1,74 @@ +import React from 'react'; +import styled from 'styled-components'; +import DefaultProfileImg from '../../assets/image/default-profile.png'; +function Review() { + return ( + + 리뷰 작성하기 + +
+ profile + 응자 +
+ 가볍게 산책하기 좋아요 + 2024.04.17 +
+ +
+ profile + 응자 +
+ 가볍게 산책하기 좋아요 + 2024.04.17 +
+
+ ); +} + +export default Review; +const ReviewLayout = styled.div` + width: 100%; + display: flex; + flex-direction: column; + padding: 15px 20px; + cursor: default; +`; + +const AddReviewButton = styled.button` + width: 300px; + height: 40px; + + background: #f9c758; + border-radius: 10px; + ${(props) => props.theme.fonts.text_md}; + color: #ffffff; +`; + +const ReviewItem = styled.div` + display: flex; + flex-direction: column; + margin-top: 20px; + + .profile-rating-box { + display: flex; + flex-direction: row; + align-items: center; + + .profile-img { + width: 26px; + height: 26px; + border-radius: 50%; + } + + .name { + ${(props) => props.theme.fonts.text_sm}; + color: ${(props) => props.theme.colors.gray600}; + margin-left: 6px; + } + } + .review-text { + margin-top: 5px; + ${(props) => props.theme.fonts.text_sm}; + color: ${(props) => props.theme.colors.gray400}; + } +`; diff --git a/src/components/Community/UserTrailMap.tsx b/src/components/Community/UserTrailMap.tsx index 139f66d..c1dd7b6 100644 --- a/src/components/Community/UserTrailMap.tsx +++ b/src/components/Community/UserTrailMap.tsx @@ -9,13 +9,19 @@ type MapProps = { lng: number; }; function UserTrailMap({ lat, lng }: MapProps) { - // useKakaoLoader(); + useKakaoLoader(); const [isOpenDrawer, setIsOpenDrawer] = useState(false); return ( <> - {isOpenDrawer && } + {isOpenDrawer && ( + + )} + - 산책 - 이음 - 서울 + 산책 + 이음 + 서울 props.theme.fonts.title_sm}; + color: ${(props) => props.theme.colors.gray600}; + } + .address-info { + ${(props) => props.theme.fonts.text_md}; + color: ${(props) => props.theme.colors.gray400}; + margin-top: 8px; + } + .description-box { + display: flex; + flex-direction: row; + width: 240px; + margin-top: 10px; + align-items: center; + + .description-text { + ${(props) => props.theme.fonts.caption}; + color: ${(props) => props.theme.colors.gray300}; + margin: 0 10px 0 3px; + } + } + .profile-box { + display: flex; + flex-direction: row; + align-items: center; + margin-top: 15px; + .profile-img { + width: 26px; + height: 26px; + border-radius: 50%; + } + .name { + ${(props) => props.theme.fonts.text_sm}; + color: ${(props) => props.theme.colors.gray600}; + margin-left: 6px; + } + } +`; + +export const MenuBox = styled.div` + width: 100%; + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + // padding: 0 40px; +`; +type LiProps = { + active: boolean; +}; +export const MenuItem = styled.li` + display: flex; + justify-content: center; + align-items: center; + min-width: 170px; + height: 40px; + // margin: 0 14px; + list-style: none; + + button { + border: none; + width: 100%; + height: 100%; + ${(props) => props.theme.fonts.text_md}; + color: ${(props) => + props.active + ? props.theme.colors.subAccentColor + : props.theme.colors.gray600}; + border-bottom: ${(props) => (props.active ? '2px solid #F9C758' : 'none')}; + background-color: transparent; + cursor: pointer; + &:hover { + color: ${(props) => props.theme.colors.subAccentColor}; + font-weight: 600; + } + } `; diff --git a/src/styles/header.style.ts b/src/styles/header.style.ts index cd22042..a2df256 100644 --- a/src/styles/header.style.ts +++ b/src/styles/header.style.ts @@ -2,7 +2,7 @@ import styled from 'styled-components'; // HeaderLayout 컴포넌트의 Props 타입 정의 type SpanProps = { - logoTextColor?: string; // logo-text의 색상을 설정할 수 있는 선택적 프로퍼티 + color?: string; // logo-text의 색상을 설정할 수 있는 선택적 프로퍼티 }; export const HeaderWrapper = styled.nav` @@ -54,5 +54,5 @@ export const LogoText = styled.span` font-weight: 400; font-size: 32px; line-height: 40px; - color: ${(props) => props.logoTextColor || '#94C020'}; + color: ${(props) => props.color || '#94C020'}; `;