From b76d59106b2a9a44c4cc3e8ac74d3395c0f1e116 Mon Sep 17 00:00:00 2001 From: nijuy Date: Wed, 4 Oct 2023 23:05:56 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20StyledBadgeProps=20=EC=86=8D?= =?UTF-8?q?=EC=84=B1=EB=AA=85=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * StyledBadgeProps 타입의 속성명 앞에 $를 추가했습니다 --- src/components/Badge/Badge.style.ts | 4 ++-- src/components/Badge/Badge.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Badge/Badge.style.ts b/src/components/Badge/Badge.style.ts index 7112d7f..210d322 100644 --- a/src/components/Badge/Badge.style.ts +++ b/src/components/Badge/Badge.style.ts @@ -3,7 +3,7 @@ import { styled } from 'styled-components'; import { SemanticColor } from '@/style'; interface StyledBadgeProps { - backgroundColor: SemanticColor; + $backgroundColor: SemanticColor; } export const StyledBadge = styled.div` display: flex; @@ -13,7 +13,7 @@ export const StyledBadge = styled.div` height: 24px; padding: 0 var(--padding); border-radius: 2px; - background-color: ${({ theme, backgroundColor }) => theme.color[backgroundColor]}; + background-color: ${({ theme, $backgroundColor }) => theme.color[$backgroundColor]}; ${({ theme }) => theme.typo.caption1}; `; diff --git a/src/components/Badge/Badge.tsx b/src/components/Badge/Badge.tsx index 91a5846..da7db4a 100644 --- a/src/components/Badge/Badge.tsx +++ b/src/components/Badge/Badge.tsx @@ -9,7 +9,7 @@ function Badge({ color = 'monoItemBG', children = 'Badge', leftIcon }: BadgeProp style={{ padding: leftIcon ? '0 8px' : '0 12px', }} - backgroundColor={color} + $backgroundColor={color} > {leftIcon && ( Date: Wed, 4 Oct 2023 23:07:09 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20Badge=20story=20=EC=9D=B4=EB=A6=84?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Badge 관련 story 이름을 PascalCase에 맞게 수정했습니다 --- src/components/Badge/Badge.stories.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Badge/Badge.stories.tsx b/src/components/Badge/Badge.stories.tsx index ff9cdf7..6e9ba5e 100644 --- a/src/components/Badge/Badge.stories.tsx +++ b/src/components/Badge/Badge.stories.tsx @@ -18,7 +18,7 @@ const BadgeStory = ({ ...badgeProps }) => { }; type Story = StoryObj; -export const withIcon: Story = { +export const WithIcon: Story = { args: { children: 'Badge', leftIcon: , @@ -26,7 +26,7 @@ export const withIcon: Story = { render: BadgeStory, }; -export const withoutIcon: Story = { +export const WithoutIcon: Story = { args: { children: 'Badge', },