From c47b6dd08b29574bad0c3a62fc0af803354401ed Mon Sep 17 00:00:00 2001 From: "yeondu._" Date: Thu, 29 Aug 2024 15:23:04 +0900 Subject: [PATCH] =?UTF-8?q?Fix=20:=20=ED=83=80=EC=9E=85=20=EC=97=90?= =?UTF-8?q?=EB=9F=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Component/Button/Animation/rotatioin.tsx | 6 ++-- src/Component/Button/button.tsx | 37 ++++++++++---------- src/Component/Calculator/calculResult.tsx | 18 +++++----- src/Component/Calculator/calculator.tsx | 12 +++---- src/Component/Modal/modal.tsx | 18 +++++----- "src/Component/News/\bnoNews.tsx" | 6 ++-- src/Component/News/NewsList.tsx | 3 +- src/Component/Portfolio/PfCreate.tsx | 6 ++-- src/Pages/404/errorPage.tsx | 6 ++-- src/Pages/home.tsx | 6 ++-- src/constants/interface.ts | 8 ++--- 11 files changed, 65 insertions(+), 61 deletions(-) diff --git a/src/Component/Button/Animation/rotatioin.tsx b/src/Component/Button/Animation/rotatioin.tsx index a0d2abf..d77a211 100644 --- a/src/Component/Button/Animation/rotatioin.tsx +++ b/src/Component/Button/Animation/rotatioin.tsx @@ -5,7 +5,7 @@ import { FaCaretDown } from "react-icons/fa"; interface SlidingDivProps { isSliding: boolean; - isNegative: boolean; + $isNegative: boolean; } const slideUp = keyframes` @@ -48,7 +48,7 @@ const SlidingDiv = styled.div` padding: 16px; animation: ${({ isSliding }) => (isSliding ? slideUp : slideDown)} 0.5s forwards; - color: ${({ isNegative }) => (isNegative ? "#615EFC" : "#FF5759")}; + color: ${({ $isNegative }) => ($isNegative ? "#615EFC" : "#FF5759")}; `; const InfoText = styled.div` @@ -139,7 +139,7 @@ const RotationAnimation: React.FC = ({ kospi, kosdaq }) => { {label}: {currentMarket.price} diff --git a/src/Component/Button/button.tsx b/src/Component/Button/button.tsx index c7f8c24..05cbbbe 100644 --- a/src/Component/Button/button.tsx +++ b/src/Component/Button/button.tsx @@ -1,27 +1,28 @@ -import styled from "styled-components" -import React from "react" +import styled from "styled-components"; +import React from "react"; import { buttonSize, buttonType } from "../../Styles/button"; import { ButtonStyleProps, ButtonProps } from "../../constants/interface"; const ButtonStyle = styled.button` - border-radius: 10px; + border-radius: 10px; - ${(props) => buttonSize[props.size]} - ${(props) => buttonType[props.colorType]?.[props.state]} -` + ${(props) => buttonSize[props.$size]} + ${(props) => buttonType[props.$colorType]?.[props.$state]} +`; -const Button = ({onClick, children, ...styleprops}: ButtonProps) => { - return ( - <> - - {children} - - - ) -} +const Button = ({ onClick, children, ...styleprops }: ButtonProps) => { + return ( + <> + + {children} + + + ); +}; export default Button; -// 버튼 사용 예시 -{/* */} - +// 버튼 사용 예시 +{ + /* */ +} diff --git a/src/Component/Calculator/calculResult.tsx b/src/Component/Calculator/calculResult.tsx index f6d14b9..b05b67d 100644 --- a/src/Component/Calculator/calculResult.tsx +++ b/src/Component/Calculator/calculResult.tsx @@ -51,7 +51,7 @@ const SpanContainer = styled.div` `; const SpanStyle = styled.div` font-weight: bold; - color: ${(props) => (props.isNegative ? "#615EFC" : "#FF5759")}; + color: ${(props) => (props.$isNegative ? "#615EFC" : "#FF5759")}; `; const SkrrrBird = styled.img` @@ -118,9 +118,9 @@ const CalculResult: React.FC = ({ {price !== 0 ? ( - {userName} + {userName} 님은 - + {formatPrice(Math.abs(price))} 원을 {price >= 0 ? "벌었습니다." : "잃었습니다.."} @@ -130,31 +130,33 @@ const CalculResult: React.FC = ({ 2024년 최저시급 기준{" "} - {slave}시간 + {slave}시간 - 새콤달콤 {candy}개 + 새콤달콤 {candy} + 개 - 국밥{soul}그릇 + 국밥{soul}그릇 - 치킨 {chicken}마리 + 치킨 {chicken} + 마리 - 아이폰 {iphone}대 + 아이폰 {iphone} diff --git a/src/Component/Calculator/calculator.tsx b/src/Component/Calculator/calculator.tsx index e5a5b8c..12d345a 100644 --- a/src/Component/Calculator/calculator.tsx +++ b/src/Component/Calculator/calculator.tsx @@ -207,9 +207,9 @@ const Calculator = () => { @@ -73,9 +73,9 @@ const ModalOpen: React.FC = ({
@@ -84,9 +84,9 @@ const ModalOpen: React.FC = ({ {showConfirmButton && onConfirm && ( diff --git "a/src/Component/News/\bnoNews.tsx" "b/src/Component/News/\bnoNews.tsx" index 12cea23..5980e1b 100644 --- "a/src/Component/News/\bnoNews.tsx" +++ "b/src/Component/News/\bnoNews.tsx" @@ -31,9 +31,9 @@ const NoNews = () => { 내 포트폴리오를 생성하고, 종목을 추가해보세요 ! diff --git a/src/Pages/404/errorPage.tsx b/src/Pages/404/errorPage.tsx index c741bbd..33151b6 100644 --- a/src/Pages/404/errorPage.tsx +++ b/src/Pages/404/errorPage.tsx @@ -29,10 +29,10 @@ const ErrorPage = () => {
diff --git a/src/Pages/home.tsx b/src/Pages/home.tsx index 33e7a74..55b9b50 100644 --- a/src/Pages/home.tsx +++ b/src/Pages/home.tsx @@ -44,7 +44,7 @@ const Kosdaq = styled.div` `; export const Info = styled.div` - color: ${(props) => (props.isNegative ? "#615EFC" : "#FF5759")}; + color: ${(props) => (props.$isNegative ? "#615EFC" : "#FF5759")}; display: flex; flex-direction: row; @@ -135,7 +135,7 @@ const Home: React.FC = () => { KOSPI {market ? ( - + {market.kospi.price} {market.kospi.change < 0 ? ( @@ -154,7 +154,7 @@ const Home: React.FC = () => { KOSDAQ {market ? ( - + {market.kosdaq.price} {market.kosdaq.change < 0 ? ( diff --git a/src/constants/interface.ts b/src/constants/interface.ts index 7405d50..ea05216 100644 --- a/src/constants/interface.ts +++ b/src/constants/interface.ts @@ -1,7 +1,7 @@ export type ButtonStyleProps = { - state: "normal"; - size: "small" | "medium" | "large" | "plusBtn" | "gradientBtn"; - colorType: "main" | "gradient" | "cancel"; + $state: "normal"; + $size: "small" | "medium" | "large" | "plusBtn" | "gradientBtn"; + $colorType: "main" | "gradient" | "cancel"; }; export interface ButtonProps extends ButtonStyleProps { @@ -80,7 +80,7 @@ export interface NewsProps { } export interface ValueProps { - isNegative: boolean; + $isNegative: boolean; } export interface ViewSelectProps {