-
Notifications
You must be signed in to change notification settings - Fork 10
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 #150 from pkiop/feat/AddrecodeInNavbar
Navbar 추가 / Navbar +버튼 클릭 시 InputRecode 나오도록 수정
- Loading branch information
Showing
8 changed files
with
132 additions
and
8 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
frontend/src/components/UI/organisms/NavBar/index.stories.tsx
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,14 @@ | ||
import React from 'react'; | ||
import GlobalThemeProvider from 'styles/GlobalThemeProvider'; | ||
import NavBar from '.'; | ||
|
||
export default { | ||
title: 'Organisms/NavBar', | ||
component: NavBar, | ||
}; | ||
|
||
export const Default = () => ( | ||
<GlobalThemeProvider> | ||
<NavBar navPlusOnClick={() => {}}/> | ||
</GlobalThemeProvider> | ||
); |
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,21 @@ | ||
import React from 'react'; | ||
import * as S from './style'; | ||
|
||
export interface Props { | ||
navPlusOnClick: any; | ||
className?: string; | ||
} | ||
|
||
function App({ navPlusOnClick, className }: Props) { | ||
return ( | ||
<> | ||
<S.NavBar className={className}> | ||
<S.AddBtn onClick={navPlusOnClick}> | ||
<S.PlusText>+</S.PlusText> | ||
</S.AddBtn> | ||
</S.NavBar> | ||
</> | ||
); | ||
} | ||
|
||
export default App; |
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,31 @@ | ||
import styled from 'styled-components'; | ||
|
||
export const NavBar = styled.div` | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
background-color: ${({ theme }) => theme.color.navbar}; | ||
z-index: 100; | ||
`; | ||
|
||
export const AddBtn = styled.div` | ||
background-color: ${({ theme }) => theme.color.beige}; | ||
width: 2.5rem; | ||
height: 2.5rem; | ||
border-radius: 1.3rem; | ||
z-index: 101; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
:hover { | ||
color: red; | ||
cursor: pointer; | ||
} | ||
`; | ||
|
||
export const PlusText = styled.div` | ||
font-size: 2rem; | ||
margin-bottom: 0.3rem; | ||
`; |
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
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,33 @@ | ||
import styled from 'styled-components'; | ||
import RecodeInputComponent from 'components/UI/organisms/RecodeInput'; | ||
|
||
export const RecodeInput = styled(RecodeInputComponent)` | ||
background-color: ${({ theme }) => theme.color.white}; | ||
margin: 0 auto; | ||
padding: 1rem 0; | ||
border-top-left-radius: ${({ theme }) => theme.size.mainInputRadius}; | ||
border-top-right-radius: ${({ theme }) => theme.size.mainInputRadius}; | ||
position: fixed; | ||
left: 4.9%; | ||
right: 4.9%; | ||
bottom: -16rem; | ||
transition: 0.4s bottom; | ||
&.active { | ||
bottom: calc(${({ theme }) => theme.size.navbarHeight} - 0.05rem); | ||
transition: 0.4s bottom; | ||
} | ||
z-index: 30; | ||
`; | ||
|
||
export const RecodeInputCover = styled.div` | ||
position: fixed; | ||
left:0; | ||
top: 0; | ||
width: 100%; | ||
height: 100%; | ||
display: none; | ||
&.active { | ||
display: flex; | ||
} | ||
`; |
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