Skip to content

Commit

Permalink
Merge pull request #11 from yourssu/feat/badge
Browse files Browse the repository at this point in the history
fix: Badge 관련 story, type 이름 수정
  • Loading branch information
nijuy authored Oct 4, 2023
2 parents b165f89 + 0680e79 commit 2384cac
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/components/Badge/Badge.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ const BadgeStory = ({ ...badgeProps }) => {
};

type Story = StoryObj<typeof Badge>;
export const withIcon: Story = {
export const WithIcon: Story = {
args: {
children: 'Badge',
leftIcon: <IcGroundLine />,
},
render: BadgeStory,
};

export const withoutIcon: Story = {
export const WithoutIcon: Story = {
args: {
children: 'Badge',
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/Badge/Badge.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { styled } from 'styled-components';
import { SemanticColor } from '@/style';

interface StyledBadgeProps {
backgroundColor: SemanticColor;
$backgroundColor: SemanticColor;
}
export const StyledBadge = styled.div<StyledBadgeProps>`
display: flex;
Expand All @@ -13,7 +13,7 @@ export const StyledBadge = styled.div<StyledBadgeProps>`
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};
`;
2 changes: 1 addition & 1 deletion src/components/Badge/Badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const Badge = ({ color = 'monoItemBG', children = 'Badge', leftIcon }: BadgeProp
style={{
padding: leftIcon ? '0 8px' : '0 12px',
}}
backgroundColor={color}
$backgroundColor={color}
>
{leftIcon && (
<IconContext.Provider
Expand Down

0 comments on commit 2384cac

Please sign in to comment.