From 29151c7fada10a3a2e5716b58c33243cb825847b Mon Sep 17 00:00:00 2001 From: Buyeon Hwang Date: Wed, 28 Aug 2024 02:43:26 +0900 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20NanumSquare=20Neo=20=ED=8F=B0?= =?UTF-8?q?=ED=8A=B8=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.tsx | 6 ++-- src/styles/fonts.ts | 68 ++++++++++++++++++++++++++++++++++++++++++++ src/styles/global.ts | 7 +++++ 3 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 src/styles/fonts.ts diff --git a/src/App.tsx b/src/App.tsx index cea4920..8cb7ab2 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,13 +1,15 @@ import { BrowserRouter } from "react-router-dom"; +import { FontsStyle } from "@/styles/fonts"; +import { GlobalStyle } from "@/styles/global"; + import { Router } from "./Router"; -import { GlobalStyle } from "./styles/global"; import { Global } from "@emotion/react"; export default function App() { return ( - + ); diff --git a/src/styles/fonts.ts b/src/styles/fonts.ts new file mode 100644 index 0000000..c2fafd0 --- /dev/null +++ b/src/styles/fonts.ts @@ -0,0 +1,68 @@ +import { css } from "@emotion/react"; + +export const FontsStyle = css` + @font-face { + font-family: "NanumSquareNeo"; + font-weight: 300; + src: url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-aLt.eot); + src: + url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-aLt.eot?#iefix) + format("embedded-opentype"), + url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-aLt.woff) + format("woff"), + url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-aLt.ttf) + format("truetype"); + } + + @font-face { + font-family: "NanumSquareNeo"; + font-weight: 400; + src: url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-bRg.eot); + src: + url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-bRg.eot?#iefix) + format("embedded-opentype"), + url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-bRg.woff) + format("woff"), + url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-bRg.ttf) + format("truetype"); + } + + @font-face { + font-family: "NanumSquareNeo"; + font-weight: 700; + src: url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-cBd.eot); + src: + url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-cBd.eot?#iefix) + format("embedded-opentype"), + url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-cBd.woff) + format("woff"), + url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-cBd.ttf) + format("truetype"); + } + + @font-face { + font-family: "NanumSquareNeo"; + font-weight: 800; + src: url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-dEb.eot); + src: + url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-dEb.eot?#iefix) + format("embedded-opentype"), + url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-dEb.woff) + format("woff"), + url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-dEb.ttf) + format("truetype"); + } + + @font-face { + font-family: "NanumSquareNeo"; + font-weight: 900; + src: url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-eHv.eot); + src: + url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-eHv.eot?#iefix) + format("embedded-opentype"), + url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-eHv.woff) + format("woff"), + url(https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareNeo/NanumSquareNeoTTF-eHv.ttf) + format("truetype"); + } +`; diff --git a/src/styles/global.ts b/src/styles/global.ts index 4107419..2318bc0 100644 --- a/src/styles/global.ts +++ b/src/styles/global.ts @@ -5,6 +5,13 @@ export const GlobalStyle = css` padding: 0; border: 0; + body { + margin: 0; + padding: 0; + border: 0; + font-family: "NanumSquareNeo", sans-serif; + } + box-sizing: border-box; img { From 0f5b719077e61a77cbe2b92c376c2009717c2981 Mon Sep 17 00:00:00 2001 From: toothlessdev Date: Wed, 28 Aug 2024 03:06:02 +0900 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20Text=20=EC=BB=B4=ED=8F=AC=EB=84=8C?= =?UTF-8?q?=ED=8A=B8=20forwardRef=20=EC=A0=84=EB=8B=AC=20=EB=B0=8F=20?= =?UTF-8?q?=EC=A0=84=EC=97=AD=20=EC=8A=A4=ED=83=80=EC=9D=BC=20=EC=B4=88?= =?UTF-8?q?=EA=B8=B0=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/typography/Text.tsx | 8 ++++++-- src/styles/global.ts | 11 ++++++----- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/components/typography/Text.tsx b/src/components/typography/Text.tsx index 3b3bfc9..389d252 100644 --- a/src/components/typography/Text.tsx +++ b/src/components/typography/Text.tsx @@ -7,6 +7,10 @@ export interface TextProps extends React.ComponentProps<"span"> { children: React.ReactNode; } -export const Text = forwardRef(({ children, ...props }) => { - return {children}; +export const Text = forwardRef(({ children, ...props }, ref) => { + return ( + + {children} + + ); }); diff --git a/src/styles/global.ts b/src/styles/global.ts index 2318bc0..e1996c6 100644 --- a/src/styles/global.ts +++ b/src/styles/global.ts @@ -1,9 +1,12 @@ import { css } from "@emotion/react"; export const GlobalStyle = css` - margin: 0; - padding: 0; - border: 0; + * { + margin: 0; + padding: 0; + border: 0; + box-sizing: border-box; + } body { margin: 0; @@ -12,8 +15,6 @@ export const GlobalStyle = css` font-family: "NanumSquareNeo", sans-serif; } - box-sizing: border-box; - img { display: block; } From fac638291eaeff3499fe6b9920df589272017aee Mon Sep 17 00:00:00 2001 From: toothlessdev Date: Wed, 28 Aug 2024 03:06:57 +0900 Subject: [PATCH 3/3] =?UTF-8?q?chore:=20e2e=20=EC=83=98=ED=94=8C=20?= =?UTF-8?q?=ED=85=8C=EC=8A=A4=ED=8A=B8=20=ED=8C=8C=EC=9D=BC=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cypress/e2e/sample.cy.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/cypress/e2e/sample.cy.ts b/cypress/e2e/sample.cy.ts index c0e08c7..e69de29 100644 --- a/cypress/e2e/sample.cy.ts +++ b/cypress/e2e/sample.cy.ts @@ -1,8 +0,0 @@ -describe("cypress 테스트", () => { - it("test", () => { - cy.visit("/"); - cy.get("button#increment").should("have.text", "count is 0"); - cy.get("button#increment").click(); - cy.get("button#increment").should("have.text", "count is 1"); - }); -});