-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from chhw130/dev
PR : mypage 작업
- Loading branch information
Showing
18 changed files
with
569 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Box, Card, CardBody, CardProps } from "@chakra-ui/react"; | ||
import { Children } from "react"; | ||
|
||
const ChattingMsgCard = ({ children }: CardProps) => { | ||
return ( | ||
<> | ||
<Card | ||
bgColor={"#F5F5F9"} | ||
width={"max-content"} | ||
shadow={"none"} | ||
margin={"0px 0px 0px 22px"} | ||
> | ||
<CardBody | ||
color={"#2F2F2F"} | ||
padding={"14px 16px"} | ||
width={"max-content"} | ||
maxW={"346px"} | ||
fontSize={"18px"} | ||
> | ||
{children} | ||
</CardBody> | ||
</Card> | ||
</> | ||
); | ||
}; | ||
|
||
export default ChattingMsgCard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import { Box, Divider, Flex, Heading, Text, VStack } from "@chakra-ui/react"; | ||
import ChattingMsgCard from "../card/ChattingMsgCard"; | ||
import UserChattingMsgCard from "./UserChattingMsgCard"; | ||
import DietChattingMsgCart from "./DietChattingMsgCard"; | ||
import ChattingInput from "../input/ChattingInput"; | ||
|
||
const ChattingRoom = () => { | ||
return ( | ||
<> | ||
<Flex | ||
w={"100%"} | ||
bgColor={"#FFFFFF"} | ||
h={"80%"} | ||
borderRadius={"12px 12px 0 0"} | ||
position={"absolute"} | ||
bottom={"0"} | ||
overflow={"scroll"} | ||
flexDir={"column"} | ||
> | ||
<Box textAlign={"center"} w={"100%"} padding={"10px 22px"}> | ||
<Heading | ||
as={"h1"} | ||
color={"#000000"} | ||
fontSize={"20px"} | ||
fontWeight={"medium"} | ||
> | ||
식선생 | ||
</Heading> | ||
<Text as={"h2"} color={"#787878"} fontSize={"12px"} lineHeight={2}> | ||
다이어트는 의지의 차이입니다. | ||
</Text> | ||
<Divider padding={"4.5px 0"} color={"#ECECEC"} /> | ||
</Box> | ||
<VStack | ||
w={"100%"} | ||
alignItems={"flex-start"} | ||
spacing={"16px"} | ||
marginTop={"10px"} | ||
> | ||
<ChattingMsgCard>반갑습니다 00님</ChattingMsgCard> | ||
<ChattingMsgCard> | ||
자, 오늘은 어떤 음식을 드셨나요? | ||
<br /> | ||
아침, 점심, 저녁 메뉴를 알려주세요 | ||
<Text as={"h2"} color={"#787878"} fontSize={"16px"} lineHeight={2}> | ||
ex) 아침은 00 점심은 00 저녁은 00을 먹었어 | ||
</Text> | ||
</ChattingMsgCard> | ||
|
||
<UserChattingMsgCard> | ||
아침은 계란후라이 점심은 마라탕 저녁은 칼국수를 먹었어 | ||
</UserChattingMsgCard> | ||
|
||
<DietChattingMsgCart /> | ||
</VStack> | ||
<ChattingInput /> | ||
</Flex> | ||
</> | ||
); | ||
}; | ||
|
||
export default ChattingRoom; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
import { | ||
Box, | ||
Button, | ||
Card, | ||
CardBody, | ||
CardHeader, | ||
CardProps, | ||
Divider, | ||
Flex, | ||
Heading, | ||
Text, | ||
} from "@chakra-ui/react"; | ||
|
||
const DietChattingMsgCart = ({}: CardProps) => { | ||
return ( | ||
<> | ||
<Card | ||
w={"312px"} | ||
bgColor={"#F5F5F9"} | ||
shadow={"none"} | ||
margin={"0px 0px 0px 22px"} | ||
> | ||
<CardHeader padding={"14px 16px 0 16px"}> | ||
<Flex justifyContent={"space-between"} textAlign={"center"}> | ||
<Box> | ||
<Text as={"h2"} color={"#787878"} fontSize={"15px"}> | ||
아침 | ||
</Text> | ||
<Heading | ||
as={"h1"} | ||
color={"#000000"} | ||
fontSize={"18px"} | ||
fontWeight={"regular"} | ||
> | ||
200 Kcal | ||
</Heading> | ||
</Box> | ||
<Box> | ||
<Text as={"h2"} color={"#787878"} fontSize={"15px"}> | ||
점심 | ||
</Text> | ||
<Heading | ||
as={"h1"} | ||
color={"#000000"} | ||
fontSize={"18px"} | ||
fontWeight={"regular"} | ||
> | ||
1000 Kcal | ||
</Heading> | ||
</Box> | ||
<Box> | ||
<Text as={"h2"} color={"#787878"} fontSize={"15px"}> | ||
저녁 | ||
</Text> | ||
<Heading | ||
as={"h1"} | ||
color={"#000000"} | ||
fontSize={"18px"} | ||
fontWeight={"regular"} | ||
> | ||
900 Kcal | ||
</Heading> | ||
</Box> | ||
</Flex> | ||
<Divider margin={"0 auto"} padding={"4.5px 0"} color={"#ECECEC"} /> | ||
<Text | ||
textAlign={"center"} | ||
paddingTop={"4.5px"} | ||
color={"#FF6C6C"} | ||
fontWeight={"medium"} | ||
> | ||
300 Kcal가 초과되셨습니다. | ||
</Text> | ||
</CardHeader> | ||
<CardBody color={"#2F2F2F"} padding={"16px 14px 14px 14px"}> | ||
<Button bgColor={"#FFFFFF"} w={"100%"} h={"41px"}> | ||
식단 상세보기 | ||
</Button> | ||
</CardBody> | ||
</Card> | ||
</> | ||
); | ||
}; | ||
|
||
export default DietChattingMsgCart; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { Box, Card, HStack, Text } from "@chakra-ui/react"; | ||
import Image from "next/image"; | ||
|
||
const DietStateCard = () => { | ||
return ( | ||
<> | ||
<Card | ||
bg={"rgba(0, 0, 0, 0.2)"} | ||
h={"70px"} | ||
w={"346px"} | ||
color={"#FFFFFF"} | ||
padding={"22px"} | ||
flexDir={"row"} | ||
borderRadius={"12px"} | ||
> | ||
<HStack display={"flex"} margin={"0 auto"} w={"100%"} spacing={"18px"}> | ||
<Box w={"20%"}> | ||
<Image | ||
src={ | ||
"https://images.pexels.com/photos/842711/pexels-photo-842711.jpeg" | ||
} | ||
alt="식선생" | ||
width={70} | ||
height={70} | ||
/> | ||
</Box> | ||
<Box w={"70%"}> | ||
<Text> | ||
식단을 입력하시면 | ||
<br /> | ||
오늘의 솔루션을 드릴게요 | ||
</Text> | ||
</Box> | ||
</HStack> | ||
</Card> | ||
</> | ||
); | ||
}; | ||
|
||
export default DietStateCard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { Card, CardBody, CardProps } from "@chakra-ui/react"; | ||
|
||
const TodayReportCard = ({ children }: CardProps) => { | ||
return ( | ||
<> | ||
<Card | ||
bgColor={"#F5F5F9"} | ||
width={"max-content"} | ||
shadow={"none"} | ||
w={"100%"} | ||
> | ||
<CardBody | ||
color={"#2F2F2F"} | ||
padding={"14px 16px"} | ||
width={"max-content"} | ||
maxW={"346px"} | ||
fontSize={"18px"} | ||
> | ||
{children} | ||
</CardBody> | ||
</Card> | ||
</> | ||
); | ||
}; | ||
|
||
export default TodayReportCard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { Box, Card, CardBody, CardProps } from "@chakra-ui/react"; | ||
|
||
const UserChattingMsgCard = ({ children }: CardProps) => { | ||
return ( | ||
<> | ||
<Card | ||
bgColor={"#F5F5F9"} | ||
width={"max-content"} | ||
shadow={"none"} | ||
margin={"0px 22px 0px 0px"} | ||
float={"right"} | ||
fontSize={"18px"} | ||
alignSelf={"flex-end"} | ||
> | ||
<CardBody | ||
color={"#2F2F2F"} | ||
padding={"14px 16px"} | ||
width={"max-content"} | ||
maxW={"320px"} | ||
> | ||
{children} | ||
</CardBody> | ||
</Card> | ||
</> | ||
); | ||
}; | ||
|
||
export default UserChattingMsgCard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.