diff --git a/src/components/MainLayout.jsx b/src/components/MainLayout.jsx index 987e9cd..cfa9609 100644 --- a/src/components/MainLayout.jsx +++ b/src/components/MainLayout.jsx @@ -2,11 +2,6 @@ import React from 'react'; import MainNavigationBar from './MainNavigationBar'; import styled from 'styled-components'; -const Content = styled.div` - flex: 1; - overflow: auto; -`; - const LayoutContainer = styled.div` display: flex; flex-direction: column; @@ -15,6 +10,11 @@ const LayoutContainer = styled.div` background-color: white; `; +const Content = styled.div` + flex: 1; + overflow: auto; +`; + const MainLayout = ({ children, showMainNav }) => { return ( @@ -26,4 +26,4 @@ const MainLayout = ({ children, showMainNav }) => { ); }; -export default MainLayout; +export default MainLayout; \ No newline at end of file diff --git a/src/pages/group/BasicInfo.jsx b/src/pages/group/BasicInfo.jsx index 06f08d2..d5bf73f 100644 --- a/src/pages/group/BasicInfo.jsx +++ b/src/pages/group/BasicInfo.jsx @@ -1,9 +1,7 @@ -import React from 'react'; - -function BasicInfo() { +const BasicInfo = () => { return (
-

기본 정보

+

기본정보

); } diff --git a/src/pages/group/Fee.jsx b/src/pages/group/Fee.jsx index 7c7f174..eeb9698 100644 --- a/src/pages/group/Fee.jsx +++ b/src/pages/group/Fee.jsx @@ -1,10 +1,85 @@ import React from 'react'; +import styled from 'styled-components'; +import FeeInfoCard from './group_components/FeeInfoCard'; +import ExpenseItem from './group_components/ExpenseItem'; -function Fee() { +const Container = styled.div` + padding: 20px; + background-color: ${({ theme }) => theme.colors.neutral[100]}; + height: 100vh; +`; + +const CardContainer = styled.div` + padding: 16px; + background-color: ${({ theme }) => theme.colors.main[500]}; + border-radius: 20px 20px 0 0; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); +`; + +const FeeText = styled.div` + color: white; + padding: 72px 28px 40px; + text-align: center; + font-size: 32px; + font-weight: bold; + border-radius: 20px 20px 0 0; +`; + +const RegisterButton = styled.button` + width: 100%; + padding: 12px; + color: white; + border: none; + border-radius: 20px; + font-size: 16px; + font-weight: 500; + background-color: ${({ theme }) => theme.colors.main[500]}; + color: ${({ theme }) => theme.colors.main[200]}; + cursor: pointer; + margin: 12px 0; +`; + +const ExpenseContainer = styled.div` + background-color: white; + padding: 16px; + border-radius: 0 0 20px 20px; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); +`; + +const ExpenseContainerTitle = styled.h3` + color: ${({ theme }) => theme.colors.neutral[400]};; + font-size: 16px; + font-weight: 500; + margin-bottom: 16px; +`; + +const Fee = () => { return ( -
-

회비

-
+ + + 1,023,130원 + {}} + /> + {}} + /> + 회비 등록하기 + + + + 회비 사용 내역 + + + + + + ); } diff --git a/src/pages/group/Group.jsx b/src/pages/group/Group.jsx index eecf861..e1eff5a 100644 --- a/src/pages/group/Group.jsx +++ b/src/pages/group/Group.jsx @@ -1,30 +1,36 @@ import styled from 'styled-components'; import { Outlet } from 'react-router-dom'; -import GroupHeader from '../../components/group/GroupHeader'; -import GroupTabBar from '../../components/group/GroupTabBar'; - -const GroupContainer = styled.div` - padding-top: 92px; // 헤더와 탭바의 높이를 고려한 여백 -`; +import GroupHeader from './group_components/GroupHeader'; +import GroupTabBar from './group_components/GroupTabBar'; const FixedContainer = styled.div` - position: fixed; + position: sticky; top: 0; + left: 0; width: 100%; + background-color: white; + z-index: 1000; +`; + +const ContentContainer = styled.div` + overflow: hidden; + display: flex; + flex-direction: column; + height: 100vh; `; -function GroupLayout() { +const Group = () => { return ( <> - + - + ); } -export default GroupLayout; +export default Group; diff --git a/src/pages/group/Notice.jsx b/src/pages/group/Notice.jsx index 12b5d5e..423b0a4 100644 --- a/src/pages/group/Notice.jsx +++ b/src/pages/group/Notice.jsx @@ -1,69 +1,50 @@ -import React from 'react'; +import styled from 'styled-components'; +import NoticeItem from './group_components/NoticeItem'; -function Notice() { - return ( -
-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

-

공지

+const Container = styled.div` + background-color: ${({ theme }) => theme.colors.neutral[100]}; + width: 100%; + margin; 0 auto; + height: 100vh; + position: relative; +`; +// TODO: 플로팅버튼 위치 조정해줘야 함 +const FloatingButton = styled.button` + position: fixed; + bottom: 84px; + right: 20px; + width: 70px; + height: 70px; + border-radius: 50%; + background-color: white; + color: black; + font-size: 32px; + border: none; + box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; + z-index: 1000; +`; -
+const Notice = () => { + return ( + + {/* TODO: API 연결 필요 */} + + + + + + + + + + + + + ); } diff --git a/src/pages/group/Schedule.jsx b/src/pages/group/Schedule.jsx index 5b58c27..dfaf94b 100644 --- a/src/pages/group/Schedule.jsx +++ b/src/pages/group/Schedule.jsx @@ -1,6 +1,4 @@ -import React from 'react'; - -function Schedule() { +const Schedule = () => { return (

일정

diff --git a/src/pages/group/group_components/ExpenseItem.jsx b/src/pages/group/group_components/ExpenseItem.jsx new file mode 100644 index 0000000..6e24e83 --- /dev/null +++ b/src/pages/group/group_components/ExpenseItem.jsx @@ -0,0 +1,40 @@ +import styled from 'styled-components'; + +const Container = styled.div` + display: flex; + padding: 12px 0; +// border-bottom: 1px solid #ddd; + align-items: center; + &:last-child { + border-bottom: none; + } +`; + +const ExpenseDate = styled.div` + font-size: 16px; + color: ${({ theme }) => theme.colors.neutral[800]}; +`; + +const ExpenseDescription = styled.div` + font-size: 16px; + margin-left: 16px; + color: ${({ theme }) => theme.colors.neutral[800]}; + flex: 1; +`; + +const ExpenseAmount = styled.div` + font-size: 18px; + font-weight: 600; + color: ${({ theme }) => theme.colors.main[500]}; + margin-left: auto; +`; + +const ExpenseItem = ({ date, description, amount }) => ( + + {date} + {description} + {amount} + +); + +export default ExpenseItem; diff --git a/src/pages/group/group_components/FeeInfoCard.jsx b/src/pages/group/group_components/FeeInfoCard.jsx new file mode 100644 index 0000000..e0a3f5d --- /dev/null +++ b/src/pages/group/group_components/FeeInfoCard.jsx @@ -0,0 +1,61 @@ +import React from 'react'; +import styled from 'styled-components'; + +const Container = styled.div` + margin: 4px 0; + padding: 12px 16px; + background-color: white; + border-radius: 12px; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + display: flex; + justify-content: space-between; + align-items: center; + position: relative; +`; + +const FeeInfoTextContainer = styled.div` + display: flex; + align-items: center; + flex: 1; + font-size: 16px; + color: ${({ theme }) => theme.colors.neutral[700]}; + position: relative; +`; + +const FeeInfoText = styled.div` + font-weight: 600; + white-space: nowrap; +`; + +const FeeInfoAmount = styled.div` + font-weight: 500; + white-space: nowrap; + position: absolute; + right: 76px; +`; + +const FeeInfoDate = styled.div` + font-weight: 500; + white-space: nowrap; + position: absolute; + right: 12px; +`; + +const FeeInfoButton = styled.div` + background-color: pink; + width: 24px; + height: 24px; +`; + +const FeeInfoCard = ({ label, amount, dueDate, onClick }) => ( + + + {label} + {amount} + {dueDate} + + + +); + +export default FeeInfoCard; diff --git a/src/components/group/GroupHeader.jsx b/src/pages/group/group_components/GroupHeader.jsx similarity index 87% rename from src/components/group/GroupHeader.jsx rename to src/pages/group/group_components/GroupHeader.jsx index 8754f02..a075e9b 100644 --- a/src/components/group/GroupHeader.jsx +++ b/src/pages/group/group_components/GroupHeader.jsx @@ -1,7 +1,7 @@ import React from 'react'; import styled from 'styled-components'; -const HeaderContainer = styled.div` +const Container = styled.div` display: flex; align-items: center; padding: 10px 20px; @@ -25,10 +25,10 @@ const Title = styled.h1` function GroupHeader() { return ( - + 중앙가르드 - + ); } diff --git a/src/components/group/GroupTabBar.jsx b/src/pages/group/group_components/GroupTabBar.jsx similarity index 94% rename from src/components/group/GroupTabBar.jsx rename to src/pages/group/group_components/GroupTabBar.jsx index 63be584..6af10ed 100644 --- a/src/components/group/GroupTabBar.jsx +++ b/src/pages/group/group_components/GroupTabBar.jsx @@ -2,7 +2,7 @@ import React from 'react'; import { NavLink } from 'react-router-dom'; import styled from 'styled-components'; -const TabNav = styled.nav` +const Container = styled.nav` display: flex; align-items: center; padding: 12px 20px; @@ -36,12 +36,12 @@ const TabItem = styled(NavLink)` function GroupTabBar() { return ( - + 기본 정보 일정 공지 회비 - + ); } diff --git a/src/pages/group/group_components/NoticeItem.jsx b/src/pages/group/group_components/NoticeItem.jsx new file mode 100644 index 0000000..1d140a6 --- /dev/null +++ b/src/pages/group/group_components/NoticeItem.jsx @@ -0,0 +1,48 @@ +import styled from 'styled-components'; + +const Container = styled.div` + border-bottom: 1px solid rgba(221, 221, 221, 0.5); /* 50% 투명도 */ + background-color: white; + padding: 16px 20px; +`; + +const NoticeTitle = styled.div` + font-size: 16px; + font-weight: bold; + color: ${({ theme }) => theme.colors.neutral[700]}; + display: flex; + align-items: center; +`; + +const NoticeDate = styled.div` + font-size: 12px; + margin-top: 10px; + color: ${({ theme }) => theme.colors.neutral[400]}; +`; + +const NewTag = styled.div` + background-color: ${({ theme }) => theme.colors.main[500]}; + color: #fff; + width: 12px; + height: 12px; + padding: 2px 2px; + font-size: 10px; + margin-left: 8px; + border-radius: 6px; + display: flex; + align-items: center; + justify-content: center; +`; + +const NoticeItem = ({ title, date, isNew }) => { + return ( + + + {title} {isNew && N} + + {date} + + ); +} + +export default NoticeItem; diff --git a/src/styles/global-style.js b/src/styles/global-style.js index ae2c85d..f342e4c 100644 --- a/src/styles/global-style.js +++ b/src/styles/global-style.js @@ -11,11 +11,12 @@ html, body { margin: 0; padding: 0; display: flex; - flex-direction: row; + // flex-direction: row; background-color: #F2F4F7; justify-content: center; font-family: 'Pretendard'; } + #root { width: 100%;