-
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 branch 'main' into origin/feat/#9
- Loading branch information
Showing
12 changed files
with
295 additions
and
72 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,61 @@ | ||
import { View, Text } from "react-native"; | ||
import React, { HTMLAttributes } from "react"; | ||
import styled from "styled-components/native"; | ||
import MolText from "../Text/Text"; | ||
|
||
type ColorType = "blue" | "grey"; | ||
|
||
type SizeType = "small" | "big"; | ||
|
||
type ButtonProps = HTMLAttributes<HTMLParagraphElement> & { | ||
ColorType: ColorType; | ||
SizeType: SizeType; | ||
text: string; | ||
}; | ||
const MolButton = (props: ButtonProps) => { | ||
const { ColorType, SizeType, text } = props; | ||
return ( | ||
<Container ColorType={ColorType} SizeType={SizeType}> | ||
<MolText | ||
label={text} | ||
align="center" | ||
size="17" | ||
weight="bold" | ||
color="white" | ||
/> | ||
</Container> | ||
); | ||
}; | ||
|
||
export default MolButton; | ||
|
||
const Container = styled.View<{ ColorType: ColorType; SizeType: SizeType }>` | ||
border-radius: 30px; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
background-color: ${({ ColorType }) => { | ||
switch (ColorType) { | ||
case "blue": | ||
return "#9DE1FF"; | ||
case "grey": | ||
return "#C5C5C5"; | ||
} | ||
}}; | ||
width: ${({ SizeType }) => { | ||
switch (SizeType) { | ||
case "small": | ||
return "55px"; | ||
case "big": | ||
return "125px"; | ||
} | ||
}}; | ||
height: ${({ SizeType }) => { | ||
switch (SizeType) { | ||
case "small": | ||
return "35px"; | ||
case "big": | ||
return "45px"; | ||
} | ||
}}; | ||
`; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
import { Image, Text, View } from "react-native"; | ||
import React from "react"; | ||
import styled from "styled-components/native"; | ||
import MolText from "../../atom/Text/Text"; | ||
|
||
const Widget = () => { | ||
return ( | ||
<Container> | ||
<MolText | ||
color="black" | ||
label="어떤 답변을 원하나요?" | ||
align="center" | ||
size="22" | ||
weight="bold" | ||
mt="43" | ||
/> | ||
<MolText | ||
color="black" | ||
label="내 상황에 맞는 답변을 들을 수 있어요." | ||
align="center" | ||
size="17" | ||
mt="2" | ||
/> | ||
<ButtonContainer> | ||
<ButtonTextWrapper> | ||
<Image | ||
source={require("../../../assets/png/resultImg1.png")} | ||
style={{ | ||
width: 88, | ||
height: 88, | ||
marginBottom: 4, | ||
objectFit: "contain", | ||
}} | ||
/> | ||
<MolText color="black" label="위로해주기" align="center" size="17" /> | ||
</ButtonTextWrapper> | ||
<ButtonTextWrapper> | ||
<Image | ||
source={require("../../../assets/png/resultImg2.png")} | ||
style={{ | ||
width: 88, | ||
height: 88, | ||
marginBottom: 4, | ||
objectFit: "contain", | ||
}} | ||
/> | ||
<MolText color="black" label="편들어주기" align="center" size="17" /> | ||
</ButtonTextWrapper> | ||
</ButtonContainer> | ||
</Container> | ||
); | ||
}; | ||
|
||
export default Widget; | ||
|
||
const Container = styled.View` | ||
width: 319px; | ||
height: 312px; | ||
border-radius: 22px; | ||
background-color: #e3f5fd; | ||
display: flex; | ||
align-items: center; | ||
position: absolute; | ||
z-index: 2; | ||
`; | ||
|
||
const ButtonContainer = styled.View` | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
margin-top: 34px; | ||
width: 231px; | ||
justify-content: space-between; | ||
`; | ||
|
||
const ButtonTextWrapper = styled.View` | ||
display: flex; | ||
align-items: center; | ||
`; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.