-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ✨ Feat: 그라디언트 컴포넌트 UI 생성 * ♻️ Refactor: 랩퍼 컴포넌트 구조 개선 * ♻️ Refactor: Landing 및 Not Found 페이지 그라데이션 적용 * 📦️ Chore: 임시 내용 저장 * 🐛 Fix: 공통 컴포넌트 적용 완료 * 📦️ Chore: Background 컴포넌트 일부 적용 및 특정 페이지 내 scss 파일 변경
- Loading branch information
Showing
13 changed files
with
196 additions
and
88 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,8 +1,21 @@ | ||
import React from 'react'; | ||
import { Outlet } from 'react-router-dom'; | ||
import { Outlet, useLocation } from 'react-router-dom'; | ||
|
||
import Header from '@/components/Header'; | ||
import { Background } from '@/components/Background'; | ||
|
||
const App = () => { | ||
return <Outlet />; | ||
const location = useLocation(); | ||
const regxr = /(\/list|\/myPage)/; | ||
|
||
return ( | ||
<> | ||
{regxr.test(location.pathname) && <Header />} | ||
<Background> | ||
<Outlet /> | ||
</Background> | ||
</> | ||
); | ||
}; | ||
|
||
export default App; |
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,42 @@ | ||
import * as React from 'react'; | ||
const Gradient = ({ width = 225, height = 364, ...props }) => ( | ||
<svg | ||
width={width} | ||
height={height} | ||
viewBox="0 0 225 364" | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg" | ||
{...props} | ||
> | ||
<g opacity={0.2} filter="url(#filter0_f_53_9901)"> | ||
<path | ||
d="M84.899 45.8931C82.683 -28.1392 4.57085 -48.2158 -34.2082 -49C-66.1285 -44.2946 -126.328 -0.220261 -111.766 138.433C-97.2045 277.087 -8.09171 216.596 34.6444 169.019C52.3193 158.824 87.1149 119.925 84.899 45.8931Z" | ||
fill="#14C3FE" | ||
/> | ||
</g> | ||
<defs> | ||
<filter | ||
id="filter0_f_53_9901" | ||
x={-254} | ||
y={-189} | ||
width={479} | ||
height={553} | ||
filterUnits="userSpaceOnUse" | ||
colorInterpolationFilters="sRGB" | ||
> | ||
<feFlood floodOpacity={0} result="BackgroundImageFix" /> | ||
<feBlend | ||
mode="normal" | ||
in="SourceGraphic" | ||
in2="BackgroundImageFix" | ||
result="shape" | ||
/> | ||
<feGaussianBlur | ||
stdDeviation={70} | ||
result="effect1_foregroundBlur_53_9901" | ||
/> | ||
</filter> | ||
</defs> | ||
</svg> | ||
); | ||
export default Gradient; |
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,18 @@ | ||
import PropTypes from 'prop-types'; | ||
|
||
import Gradient from '@/assets/icons/Gradient'; | ||
import style from './styles.module.scss'; | ||
|
||
export const Background = ({ children, isGradient = true }) => { | ||
return ( | ||
<div className={style.container}> | ||
{isGradient && <Gradient className={style.wrapper} />} | ||
{children} | ||
</div> | ||
); | ||
}; | ||
|
||
Background.propTypes = { | ||
children: PropTypes.node.isRequired, | ||
isGradient: PropTypes.bool, | ||
}; |
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,15 @@ | ||
@import '../../styles/'; | ||
|
||
.container { | ||
position: relative; | ||
background-color: $color-black-200; | ||
min-height: 100dvh; | ||
} | ||
|
||
.wrapper { | ||
position: absolute; | ||
top: 10px; | ||
margin: 0; | ||
padding: 0; | ||
z-index: 99; | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
@import '../../styles/'; | ||
|
||
.container { | ||
background-color: $color-black-200; | ||
background-color: none; | ||
} | ||
|
||
.main { | ||
|
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
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
Oops, something went wrong.