Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: differentiate bottom navigate icons #158

Merged
merged 2 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/assets/icons/a-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/assets/icons/a-stroke-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/assets/icons/b-fill-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/assets/icons/b-stroke-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions src/assets/icons/home-selected.svg

This file was deleted.

5 changes: 5 additions & 0 deletions src/assets/icons/home-stroke.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/assets/icons/home.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 10 additions & 2 deletions src/assets/icons/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
/* eslint-disable import/no-unresolved */
import ALogoIcon from './a-logo.svg?react';
import AStrokeLogoIcon from './a-stroke-logo.svg?react';
import ABLogoIcon from './ab-logo.svg?react';
import ABIcon from './ab.svg?react';
import AlarmIcon from './alarm-default.svg?react';
import NewAlarmIcon from './alarm-new.svg?react';
import AppleIcon from './apple.svg?react';
import BFillLogoIcon from './b-fill-logo.svg?react';
import BLogoIcon from './b-logo.svg?react';
import BStrokeLogoIcon from './b-stroke-logo.svg?react';
import BigDownChevronIcon from './big-down-chevron.svg?react';
import CheckIcon from './check.svg?react';
import ClockIcon from './clock.svg?react';
Expand All @@ -15,7 +18,8 @@ import DownChevronIcon from './down-chevron.svg?react';
import GoogleIcon from './google.svg?react';
import HideIcon from './hide.svg?react';
import HitIcon from './hit.svg?react';
import SelectedHomeIcon from './home-selected.svg?react';
import HomeStrokeIcon from './home-stroke.svg?react';
import HomeIcon from './home.svg?react';
import KakaoIcon from './kakao.svg?react';
import LeftDoubleArrowIcon from './left-double-arrow.svg?react';
import MeatballIcon from './meatball.svg?react';
Expand All @@ -38,8 +42,11 @@ export {
AlarmIcon,
ALogoIcon,
AppleIcon,
AStrokeLogoIcon,
BFillLogoIcon,
BigDownChevronIcon,
BLogoIcon,
BStrokeLogoIcon,
CheckIcon,
ClockIcon,
CloseIcon,
Expand All @@ -48,6 +55,8 @@ export {
GoogleIcon,
HideIcon,
HitIcon,
HomeIcon,
HomeStrokeIcon,
KakaoIcon,
LeftDoubleArrowIcon,
MeatballIcon,
Expand All @@ -59,7 +68,6 @@ export {
RightChevronIcon,
RightDoubleArrowIcon,
RotateIcon,
SelectedHomeIcon,
SizeUpIcon,
ThumbsIcon,
TopicCreatBackgrounIcon,
Expand Down
12 changes: 8 additions & 4 deletions src/assets/icons/profile.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
72 changes: 61 additions & 11 deletions src/components/commons/BottomNavigation/BottomNavigation.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
import React from 'react';
import { NavLink } from 'react-router-dom';
import React, { PropsWithChildren } from 'react';

import Text from '@components/commons/Text/Text';

import { ALogoIcon, BLogoIcon, WriteBoxIcon, ProfileIcon, SelectedHomeIcon } from '@icons/index';
import { colors } from '@styles/theme';

import {
ALogoIcon,
BLogoIcon,
WriteBoxIcon,
ProfileIcon,
HomeIcon,
HomeStrokeIcon,
AStrokeLogoIcon,
BStrokeLogoIcon,
BFillLogoIcon,
} from '@icons/index';

import {
Container,
Expand All @@ -14,25 +25,64 @@ import {
} from './BottomNavigation.styles';

const BottomNavigation = () => {
const inactiveColor = '#A2A1A6';

return (
<Container>
<RadiusContainer>
<StyledNavLink to={'/'}>
<SelectedHomeIcon width={26} height={26} />
<Text size={12}>ํ™ˆ</Text>
{({ isActive }) => (
<>
{isActive ? (
<HomeIcon width={26} height={26} />
) : (
<HomeStrokeIcon width={26} height={26} fill={colors.white_60} />
)}
<Text size={12} color={isActive ? colors.white : inactiveColor}>
ํ™ˆ
</Text>
</>
)}
</StyledNavLink>
<StyledNavLink to={'/topics/a'}>
<ALogoIcon width={19} height={20} />
<Text size={12}>A์‚ฌ์ด๋“œ</Text>
{({ isActive }) => (
<>
{isActive ? (
<ALogoIcon width={19} height={20} fill={colors.white} />
) : (
<AStrokeLogoIcon width={19} height={20} stroke={inactiveColor} />
)}
<Text size={12} color={isActive ? colors.white : inactiveColor}>
A์‚ฌ์ด๋“œ
</Text>
</>
)}
</StyledNavLink>
<Empty />
<StyledNavLink to={'/b'}>
<BLogoIcon width={17} height={20} />
<Text size={12}>B์‚ฌ์ด๋“œ</Text>
{({ isActive }) => (
<>
{isActive ? <BFillLogoIcon /> : <BStrokeLogoIcon />}
<Text size={12} color={isActive ? colors.white : inactiveColor}>
B์‚ฌ์ด๋“œ
</Text>
</>
)}
</StyledNavLink>
<StyledNavLink to={'/profile'}>
<ProfileIcon width={26} height={26} />
<Text size={12}>MY</Text>
{({ isActive }) => (
<>
<ProfileIcon
width={26}
height={26}
fill={isActive ? colors.white : 'rgba(255, 255, 255, 0.0)'}
stroke={isActive ? 'transparent' : colors.white_60}
/>
<Text size={12} color={isActive ? colors.white : inactiveColor}>
MY
</Text>
</>
)}
</StyledNavLink>
</RadiusContainer>
<StyledNavLink to={'/topics/create'}>
Expand Down
2 changes: 1 addition & 1 deletion src/routes/Auth/kakao/KakaoLogin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const KakaoLogin = () => {
gap={7.5}
style={{ width: '100%', height: '100%' }}
>
<ALogoIcon width={65} />
<ALogoIcon width={65} fill={colors.A} />
<BLogoIcon width={66} />
</Row>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/routes/Topic/TopicSideSelection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const TopicSideSelection = () => {
</SelectDescription>
<ButtonContainer>
<AButton selected={selected} onClick={handleAButtonClick}>
<ALogoIcon />
<ALogoIcon fill={colors.A} />
<ADescription selected={selected}>
Anything <br /> Side
</ADescription>
Expand Down
Loading