Skip to content

Commit

Permalink
feat(layout): Add layout title logo
Browse files Browse the repository at this point in the history
  • Loading branch information
1ilsang committed Aug 19, 2023
1 parent bfaf08e commit 4c59d78
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
File renamed without changes
3 changes: 2 additions & 1 deletion src/features/login/Container.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { FunctionComponent } from 'react';

import useLogin from './hooks/useLogin';
import logo from './logo.svg';
import './style/index.scss';

import logo from '/svg/logo.svg';

const LoginContainer: FunctionComponent = () => {
const { errors, register, handleSubmit, onSubmit } = useLogin();

Expand Down
11 changes: 10 additions & 1 deletion src/features/shared/layout/components/Title.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { useNavigate } from 'react-router-dom';

import { titleAtom } from '../atom';

import logo from '/svg/logo.svg';
import backLogo from '/svg/back.svg';

const LayoutTitle: FunctionComponent = () => {
Expand All @@ -23,7 +24,15 @@ const LayoutTitle: FunctionComponent = () => {
<img src={backLogo} alt="Back Logo" onClick={handleBackClick} />
)}
</div>
<div className="title">{title}</div>
<div className="title">
{title === 'CardMe' ? (
<div className="logo">
<img className="logo" src={logo} alt="logo" />
</div>
) : (
title
)}
</div>
<div className="left" />
</div>
);
Expand Down
6 changes: 5 additions & 1 deletion src/features/shared/layout/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
justify-content: space-between;
align-items: center;
height: 61px;
padding: 8px;
padding: 0px 8px;
gap: 8px;

&.under-line {
Expand All @@ -38,6 +38,10 @@
font-weight: 500;
font-size: 24px;
line-height: 24px;

.logo {
height: 24px;
}
}
}

Expand Down

0 comments on commit 4c59d78

Please sign in to comment.