From 21b864d9701971ce6608d72d99084addf470381c Mon Sep 17 00:00:00 2001 From: ssi02014 Date: Wed, 8 May 2024 15:16:10 +0900 Subject: [PATCH] =?UTF-8?q?docs:=20When=20=EC=BB=B4=ED=8F=AC=EB=84=8C?= =?UTF-8?q?=ED=8A=B8=20=EB=AC=B8=EC=84=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changeset/seven-pants-eat.md | 2 +- .eslintrc.cjs | 2 +- docs/docs/react/components/When.mdx | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.changeset/seven-pants-eat.md b/.changeset/seven-pants-eat.md index a71b5ac6a..579f1187a 100644 --- a/.changeset/seven-pants-eat.md +++ b/.changeset/seven-pants-eat.md @@ -2,4 +2,4 @@ '@modern-kit/react': minor --- -#100 61d6df3 Thanks @soonki-98! - feat: SwitchCase Component 추가 및 When fallback props 추가 +feat: SwitchCase Component 추가 및 When fallback props 추가 - #100 61d5df3 @soonki-98 diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 0a5f29300..041e907e6 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -7,7 +7,7 @@ module.exports = { 'plugin:@typescript-eslint/recommended', 'plugin:react-hooks/recommended', ], - ignorePatterns: ['dist', '.eslintrc.cjs'], + ignorePatterns: ['dist', '.eslintrc.*', 'babel.*'], parser: '@typescript-eslint/parser', plugins: ['unused-imports', 'react-refresh'], rules: { diff --git a/docs/docs/react/components/When.mdx b/docs/docs/react/components/When.mdx index 9fedad85e..644d80623 100644 --- a/docs/docs/react/components/When.mdx +++ b/docs/docs/react/components/When.mdx @@ -11,14 +11,18 @@ condition prop으로 `boolean을 반환하는 함수`도 허용됩니다. ## Interface ```tsx -type Condition = boolean | ((...args: any[]) => boolean); +type Condition = boolean | (() => boolean); interface WhenProps { condition: Condition; fallback?: React.ReactNode; } -const When: ({ children, condition }: PropsWithChildren) => JSX.Element +const When: ({ + children, + condition, + fallback, +}: PropsWithChildren) => JSX.Element; ``` ## Usage