-
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.
Merge pull request #17 from prgrms-fe-devcourse/12-feat/headercomponent
12 feat/headercomponent
- Loading branch information
Showing
5 changed files
with
82 additions
and
0 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.
Empty file.
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,20 @@ | ||
import type { Meta, StoryObj } from '@storybook/react' | ||
import Header from './Header' | ||
|
||
const meta = { | ||
title: 'Widgets/Header', | ||
component: Header, | ||
parameters: { | ||
layout: 'fullscreen', | ||
}, | ||
tags: ['autodocs'], | ||
} satisfies Meta<typeof Header> | ||
|
||
export default meta | ||
type Story = StoryObj<typeof Header> | ||
|
||
export const Default: Story = { | ||
args: { | ||
isLoggedIn: false, | ||
}, | ||
} |
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,34 @@ | ||
import styled from 'styled-components' | ||
|
||
export const Container = styled.header` | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
justify-content: space-between; | ||
padding: 0.5rem; | ||
margin: 0 10% 0 10%; | ||
` | ||
|
||
export const Logo = styled.div` | ||
display: flex; | ||
cursor: pointer; | ||
` | ||
|
||
export const Nav = styled.div` | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: center; | ||
align-items: center; | ||
gap: 1rem; | ||
font-size: 15px; | ||
` | ||
|
||
export const NavItem = styled.div` | ||
display: flex; | ||
border-radius: 10%; | ||
padding: 1rem; | ||
cursor: pointer; | ||
&:hover { | ||
background-color: #f2f2f2; | ||
} | ||
` |
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,19 @@ | ||
import { Container, Logo, Nav, NavItem } from './Header.styled' | ||
|
||
const Header = () => { | ||
return ( | ||
<Container> | ||
<Logo> | ||
<img src="/logo.svg" alt="logo" /> | ||
</Logo> | ||
<Nav> | ||
<NavItem>ํ</NavItem> | ||
<NavItem>ํ์๋ผ์ธ</NavItem> | ||
<NavItem>๋ด ์ผ๊ธฐ</NavItem> | ||
<NavItem>๋ง์ดํ์ด์ง</NavItem> | ||
</Nav> | ||
</Container> | ||
) | ||
} | ||
|
||
export default Header |