-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
112 additions
and
13 deletions.
There are no files selected for viewing
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,11 @@ | ||
import styled from '@emotion/styled'; | ||
|
||
export const Container = styled.div` | ||
width: 100vw; | ||
height: 100vh; | ||
display: flex; | ||
`; | ||
|
||
export const Content = styled.div` | ||
flex-grow: 1; | ||
`; |
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,17 @@ | ||
import { Outlet } from 'react-router-dom'; | ||
|
||
import { Container, Content } from './Layout.style'; | ||
import SideNav from './SideNav'; | ||
|
||
const Layout = () => { | ||
return ( | ||
<Container> | ||
<SideNav /> | ||
<Content> | ||
<Outlet /> | ||
</Content> | ||
</Container> | ||
); | ||
}; | ||
|
||
export default Layout; |
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,43 @@ | ||
import Avatar from '@/components/common/Avatar/Avatar'; | ||
import Theme from '@/styles/Theme'; | ||
import { css } from '@emotion/css'; | ||
import styled from '@emotion/styled'; | ||
|
||
export const Container = styled.div` | ||
width: 7rem; | ||
height: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
gap: 1rem; | ||
padding: 1rem 0; | ||
box-sizing: border-box; | ||
background: ${Theme.color.logo_2}; | ||
color: ${Theme.color.gray}; | ||
`; | ||
|
||
export const AvatarGroup = styled.div` | ||
overflow: scroll; | ||
flex-grow: 1; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 1rem; | ||
width: 100%; | ||
align-items: center; | ||
`; | ||
export const iconStyle = css` | ||
display: block; | ||
width: 2rem; | ||
height: 2rem; | ||
cursor: pointer; | ||
`; | ||
export const ProfileWrapper = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
cursor: pointer; | ||
`; | ||
export const ProfileAvatar = styled(Avatar)``; | ||
export const ProfileName = styled.div` | ||
text-align: center; | ||
`; |
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,39 @@ | ||
import Avatar from '@/components/common/Avatar/Avatar'; | ||
|
||
import { FaBell, FaHome, FaPlusCircle } from 'react-icons/fa'; | ||
|
||
import { | ||
AvatarGroup, | ||
Container, | ||
ProfileAvatar, | ||
ProfileName, | ||
ProfileWrapper, | ||
iconStyle, | ||
} from './SideNav.style'; | ||
|
||
interface SideNav { | ||
name?: string; | ||
} | ||
|
||
const SideNav = ({ name = '무명' }: SideNav) => { | ||
return ( | ||
<Container> | ||
<AvatarGroup> | ||
{Array(8) | ||
.fill(null) | ||
.map((_, index) => ( | ||
<Avatar key={index} avatarShape="normal" /> | ||
))} | ||
</AvatarGroup> | ||
<FaPlusCircle className={iconStyle} /> | ||
<FaHome className={iconStyle} /> | ||
<FaBell className={iconStyle} /> | ||
<ProfileWrapper> | ||
<ProfileAvatar avatarShape="rectangle" /> | ||
<ProfileName>{name}</ProfileName> | ||
</ProfileWrapper> | ||
</Container> | ||
); | ||
}; | ||
|
||
export default SideNav; |
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