-
Notifications
You must be signed in to change notification settings - Fork 0
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 #26 from esthel7/FE/feature/login
[์๋ฏผ์] ์๊ฐํ์ด์ง, ๋ก๊ทธ์ธ UI ๋ฐ ์ ๋๋ฉ์ด์
- Loading branch information
Showing
16 changed files
with
384 additions
and
27 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 |
---|---|---|
|
@@ -10,6 +10,7 @@ | |
|
||
# production | ||
/build | ||
*/dist | ||
|
||
# misc | ||
.DS_Store | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<!doctype html> | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
|
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 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 |
---|---|---|
|
@@ -19,6 +19,13 @@ const GlobalStyles = createGlobalStyle` | |
font-weight: 700; | ||
} | ||
@font-face { | ||
font-family: 'Pretendard-Regular'; | ||
src: url('https://cdn.jsdelivr.net/gh/Project-Noonnu/[email protected]/Pretendard-Regular.woff') format('woff'); | ||
font-weight: 400; | ||
font-style: normal; | ||
} | ||
* { | ||
box-sizing: border-box; | ||
font-family: 'YClover-Bold'; | ||
|
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,50 @@ | ||
import { useState } from 'react'; | ||
import styled from 'styled-components'; | ||
import theme from '../../utils/theme'; | ||
import { Button } from '../Button'; | ||
import { Introduce } from '../Introduce'; | ||
import { LoginBox } from '../LoginBox'; | ||
|
||
const ButtonBox = styled.div` | ||
position: fixed; | ||
width: 100%; | ||
bottom: 0px; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 4px; | ||
padding: 36px; | ||
align-items: center; | ||
margin: auto; | ||
`; | ||
|
||
const IntroButtonBox = () => { | ||
const [isIntroduce, setIsIntroduce] = useState(false); | ||
const [isLogin, setIsLogin] = useState(false); | ||
|
||
return ( | ||
<> | ||
{!isIntroduce && !isLogin ? ( | ||
<ButtonBox> | ||
<Button | ||
text={'์๊ฐํ์ด์ง'} | ||
color={theme.colors['--primary-red-primary']} | ||
view={[isIntroduce, setIsIntroduce]} | ||
/> | ||
<Button | ||
text={'๋ก๊ทธ์ธ'} | ||
color={theme.colors['--primary-green-primary']} | ||
view={[isLogin, setIsLogin]} | ||
/> | ||
</ButtonBox> | ||
) : null} | ||
|
||
{isIntroduce ? ( | ||
<Introduce view={[isIntroduce, setIsIntroduce]} /> | ||
) : isLogin ? ( | ||
<LoginBox view={[isLogin, setIsLogin]} /> | ||
) : null} | ||
</> | ||
); | ||
}; | ||
|
||
export default IntroButtonBox; |
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 @@ | ||
export { default as IntroButtonBox } from './IntroButtonBox'; |
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,99 @@ | ||
import { useRef } from 'react'; | ||
import theme from '../../utils/theme'; | ||
import styled from 'styled-components'; | ||
|
||
interface IntroduceProps { | ||
view: [boolean, React.Dispatch<React.SetStateAction<boolean>>]; | ||
} | ||
|
||
const StyledIntroduce = styled.div` | ||
position: absolute; | ||
top: 25%; | ||
left: 50%; | ||
transform: translate(-50%, 0); | ||
background-color: ${theme.colors['--primary-yellow']}; | ||
font: ${theme.font['--normal-button-font']}; | ||
border-radius: 20px; | ||
width: 80%; | ||
height: 60%; | ||
padding: 10px; | ||
text-align: center; | ||
color: ${theme.colors['--black-primary']}; | ||
display: flex; | ||
flex-direction: column; | ||
animation: fadein 0.7s; | ||
@media (min-width: ${theme.size.maxWidth}) { | ||
width: 600px; | ||
} | ||
@keyframes fadein { | ||
from { | ||
opacity: 0; | ||
} | ||
to { | ||
opacity: 1; | ||
} | ||
} | ||
@keyframes fadeout { | ||
from { | ||
opacity: 1; | ||
} | ||
to { | ||
opacity: 0; | ||
} | ||
} | ||
`; | ||
|
||
const StyledText = styled.div` | ||
flex: 9; | ||
display: flex; | ||
flex-wrap: wrap; | ||
justify-content: center; | ||
align-items: center; | ||
overflow: auto; | ||
word-break: keep-all; | ||
`; | ||
|
||
const StyledClosed = styled.button` | ||
flex: 1; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
font: ${theme.font['--normal-button-font']}; | ||
font-size: 14px; | ||
line-height: normal; | ||
`; | ||
|
||
const closeIntroduce = ( | ||
props: IntroduceProps, | ||
closeRef: React.RefObject<HTMLDivElement> | ||
) => { | ||
const onAnimationEnd = () => { | ||
if (closeRef.current) { | ||
props.view[1](!props.view[0]); | ||
closeRef.current.removeEventListener('animationend', onAnimationEnd); | ||
} | ||
}; | ||
|
||
if (closeRef.current) { | ||
closeRef.current.addEventListener('animationend', onAnimationEnd); | ||
closeRef.current.style.setProperty('animation', 'fadeout 0.5s forwards'); | ||
} | ||
}; | ||
|
||
const Introduce = (props: IntroduceProps) => { | ||
const closeRef = useRef<HTMLDivElement>(null); | ||
|
||
return ( | ||
<StyledIntroduce ref={closeRef}> | ||
<StyledText>์๊ฐ๊ธ์ ์ ๋ ฅํด์ฃผ์ธ์.</StyledText> | ||
<StyledClosed onClick={() => closeIntroduce(props, closeRef)}> | ||
๋ซ๊ธฐ | ||
</StyledClosed> | ||
</StyledIntroduce> | ||
); | ||
}; | ||
|
||
export default Introduce; |
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 @@ | ||
export { default as Introduce } from './Introduce'; |
Oops, something went wrong.