From 577395e385972262ae19096cff2da38b23ff0ccf Mon Sep 17 00:00:00 2001 From: YuHyun Date: Wed, 24 Jan 2024 00:03:46 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20Coachmark=20=EA=B3=B5=ED=86=B5=20?= =?UTF-8?q?=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20=ED=8F=B4=EB=8D=94?= =?UTF-8?q?=EB=A1=9C=20=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [#304] --- .../src/components/quiz/QuizCoachmark/QuizCoachmark.tsx | 5 ++++- .../components/common/Coachmark}/CoachTooltip.css.ts | 9 +++------ .../components/common/Coachmark}/CoachTooltip.tsx | 0 .../components/common/Coachmark}/Coachmark.tsx | 4 ++-- .../components/common/Coachmark}/index.ts | 0 .../src/design-system/components/common/index.ts | 1 + 6 files changed, 10 insertions(+), 9 deletions(-) rename packages/frontend/src/{components/coachmark => design-system/components/common/Coachmark}/CoachTooltip.css.ts (87%) rename packages/frontend/src/{components/coachmark => design-system/components/common/Coachmark}/CoachTooltip.tsx (100%) rename packages/frontend/src/{components/coachmark => design-system/components/common/Coachmark}/Coachmark.tsx (90%) rename packages/frontend/src/{components/coachmark => design-system/components/common/Coachmark}/index.ts (100%) diff --git a/packages/frontend/src/components/quiz/QuizCoachmark/QuizCoachmark.tsx b/packages/frontend/src/components/quiz/QuizCoachmark/QuizCoachmark.tsx index 294743fa..c7d51554 100644 --- a/packages/frontend/src/components/quiz/QuizCoachmark/QuizCoachmark.tsx +++ b/packages/frontend/src/components/quiz/QuizCoachmark/QuizCoachmark.tsx @@ -1,7 +1,10 @@ import { ACTIONS, EVENTS } from "react-joyride"; +import { + Coachmark, + type CoachmarkProps, +} from "../../../design-system/components/common"; import { toClassSelector } from "../../../utils/cssSelector"; -import { Coachmark, type CoachmarkProps } from "../../coachmark"; interface QuizCoachmarkProps { onTourEnd: () => void; diff --git a/packages/frontend/src/components/coachmark/CoachTooltip.css.ts b/packages/frontend/src/design-system/components/common/Coachmark/CoachTooltip.css.ts similarity index 87% rename from packages/frontend/src/components/coachmark/CoachTooltip.css.ts rename to packages/frontend/src/design-system/components/common/Coachmark/CoachTooltip.css.ts index 55c32d5d..c8514f34 100644 --- a/packages/frontend/src/components/coachmark/CoachTooltip.css.ts +++ b/packages/frontend/src/design-system/components/common/Coachmark/CoachTooltip.css.ts @@ -1,11 +1,8 @@ import { style, styleVariants } from "@vanilla-extract/css"; -import color from "../../design-system/tokens/color"; -import typography from "../../design-system/tokens/typography"; -import { - borderRadius, - flexAlignCenter, -} from "../../design-system/tokens/utils.css"; +import color from "../../../tokens/color"; +import typography from "../../../tokens/typography"; +import { borderRadius, flexAlignCenter } from "../../../tokens/utils.css"; export const container = style([ borderRadius, diff --git a/packages/frontend/src/components/coachmark/CoachTooltip.tsx b/packages/frontend/src/design-system/components/common/Coachmark/CoachTooltip.tsx similarity index 100% rename from packages/frontend/src/components/coachmark/CoachTooltip.tsx rename to packages/frontend/src/design-system/components/common/Coachmark/CoachTooltip.tsx diff --git a/packages/frontend/src/components/coachmark/Coachmark.tsx b/packages/frontend/src/design-system/components/common/Coachmark/Coachmark.tsx similarity index 90% rename from packages/frontend/src/components/coachmark/Coachmark.tsx rename to packages/frontend/src/design-system/components/common/Coachmark/Coachmark.tsx index 11452b6c..d74a61fb 100644 --- a/packages/frontend/src/components/coachmark/Coachmark.tsx +++ b/packages/frontend/src/design-system/components/common/Coachmark/Coachmark.tsx @@ -1,7 +1,7 @@ import ReactJoyride, { type Props as JoyrideProps } from "react-joyride"; -import color from "../../design-system/tokens/color"; -import { coachmarkZIndex } from "../../design-system/tokens/utils.css"; +import color from "../../../tokens/color"; +import { coachmarkZIndex } from "../../../tokens/utils.css"; import { CoachTooltip } from "./CoachTooltip"; diff --git a/packages/frontend/src/components/coachmark/index.ts b/packages/frontend/src/design-system/components/common/Coachmark/index.ts similarity index 100% rename from packages/frontend/src/components/coachmark/index.ts rename to packages/frontend/src/design-system/components/common/Coachmark/index.ts diff --git a/packages/frontend/src/design-system/components/common/index.ts b/packages/frontend/src/design-system/components/common/index.ts index 53fbc7fb..7a11d93a 100644 --- a/packages/frontend/src/design-system/components/common/index.ts +++ b/packages/frontend/src/design-system/components/common/index.ts @@ -9,3 +9,4 @@ export { default as Footer } from "./Footer"; export { default as Info } from "./Info"; export { CodeBlock } from "./CodeBlock"; export { default as LinkButton } from "./LinkButton"; +export { Coachmark, type CoachmarkProps } from "./Coachmark";