Skip to content

Commit

Permalink
[๐ŸŽจ Style] TopNav ๊ณตํ†ต ์ปดํฌ๋„ŒํŠธ ์„ธํŒ…์ž‘์—… #2
Browse files Browse the repository at this point in the history
  • Loading branch information
dayannne committed Jun 10, 2023
1 parent a13efee commit 332af65
Showing 1 changed file with 51 additions and 32 deletions.
83 changes: 51 additions & 32 deletions src/components/Common/TopNav.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { useState } from "react";
import styled from "styled-components";
import SearchIcon from "../../assets/img/icon-search.svg";
import ArrowIcon from "../../assets/img/icon-arrow-left.svg";
import MoreIcon from "../../assets/img/icon- more-vertical.svg";
import { ButtonStyle } from "./ButtonStyle";
import React, { useState } from 'react';
import styled from 'styled-components';
import SearchIcon from '../../assets/img/icon-search.svg';
import ArrowIcon from '../../assets/img/icon-arrow-left.svg';
import MoreIcon from '../../assets/img/icon- more-vertical.svg';
import { ButtonStyle } from './Button';

//๋ฉ”์ธ, ํด๋ž˜์Šค ํƒ€์ดํ‹€ nav
const MainNav = styled.div`
Expand Down Expand Up @@ -141,59 +141,59 @@ function MainNavigation({ title }) {
return (
<MainNav>
<NavTitle>๋งŒ๋“ค๋งŒ๋“ค {title}</NavTitle>
<Image className="search" src={SearchIcon} alt="๊ฒ€์ƒ‰ํ•˜๊ธฐ ์•„์ด์ฝ˜" />
<Image className='search' src={SearchIcon} alt='๊ฒ€์ƒ‰ํ•˜๊ธฐ ์•„์ด์ฝ˜' />
</MainNav>
);
}

function SearchNavigation() {
return (
<SearchBackNav>
<Image src={ArrowIcon} alt="๋’ค๋กœ๊ฐ€๊ธฐ ์•„์ด์ฝ˜" />
<label htmlFor="search-input" />
<Input id="search-input" type="text" placeholder="๊ณ„์ • ๊ฒ€์ƒ‰" />
<Image src={ArrowIcon} alt='๋’ค๋กœ๊ฐ€๊ธฐ ์•„์ด์ฝ˜' />
<label htmlFor='search-input' />
<Input id='search-input' type='text' placeholder='๊ณ„์ • ๊ฒ€์ƒ‰' />
</SearchBackNav>
);
}

function MoreNavigation() {
return (
<MoreBackNav>
<Image src={ArrowIcon} alt="๋’ค๋กœ๊ฐ€๊ธฐ ์•„์ด์ฝ˜" />
<Image className="more-icon" src={MoreIcon} alt="๋”๋ณด๊ธฐ ์•„์ด์ฝ˜" />
<Image src={ArrowIcon} alt='๋’ค๋กœ๊ฐ€๊ธฐ ์•„์ด์ฝ˜' />
<Image className='more-icon' src={MoreIcon} alt='๋”๋ณด๊ธฐ ์•„์ด์ฝ˜' />
</MoreBackNav>
);
}

function ArrowLeftNavigation() {
return (
<ArrowLeft>
<Image src={ArrowIcon} alt="๋’ค๋กœ๊ฐ€๊ธฐ ์•„์ด์ฝ˜" />
<Image src={ArrowIcon} alt='๋’ค๋กœ๊ฐ€๊ธฐ ์•„์ด์ฝ˜' />
</ArrowLeft>
);
}

function SearchBar() {
return (
<SearchNav>
<Image className="search" src={SearchIcon} alt="๊ฒ€์ƒ‰ํ•˜๊ธฐ ์•„์ด์ฝ˜" />
<Image className='search' src={SearchIcon} alt='๊ฒ€์ƒ‰ํ•˜๊ธฐ ์•„์ด์ฝ˜' />
</SearchNav>
);
}

function UploadButton() {
return (
<BackButtonNav>
<Image src={ArrowIcon} alt="๋’ค๋กœ๊ฐ€๊ธฐ ์•„์ด์ฝ˜" />
<Image src={ArrowIcon} alt='๋’ค๋กœ๊ฐ€๊ธฐ ์•„์ด์ฝ˜' />
<ButtonStyle
type="button"
bg="#036635"
width="90px"
height="32px"
br="32px"
color="#ffffff"
fontsize="14px"
margin="0 16px 0 0"
type='button'
bg='#036635'
width='90px'
height='32px'
br='32px'
color='#ffffff'
fontsize='14px'
margin='0 16px 0 0'
>
์—…๋กœ๋“œ
</ButtonStyle>
Expand All @@ -204,19 +204,38 @@ function UploadButton() {
function DisabledUploadButton() {
return (
<BackButtonNav>
<Image src={ArrowIcon} alt="๋’ค๋กœ๊ฐ€๊ธฐ ์•„์ด์ฝ˜" />
<Image src={ArrowIcon} alt='๋’ค๋กœ๊ฐ€๊ธฐ ์•„์ด์ฝ˜' />
<ButtonStyle
type="button"
bg="#b1d4c3"
width="90px"
height="32px"
br="32px"
color="#ffffff"
fontsize="14px"
margin="0 16px 0 0"
type='button'
bg='#b1d4c3'
width='90px'
height='32px'
br='32px'
color='#ffffff'
fontsize='14px'
margin='0 16px 0 0'
>
์—…๋กœ๋“œ
</ButtonStyle>
</BackButtonNav>
);
}

function TopNavs({ name }) {
const [title, setTitle] = useState(name);

return (
<>
<MainNavigation title={title} />
<SearchNavigation />
<MainNavigation title={title} />
<MoreNavigation />
<ArrowLeftNavigation />
<SearchBar />
<UploadButton />
<DisabledUploadButton />
</>
);
}

export default TopNavs;

0 comments on commit 332af65

Please sign in to comment.