Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Badge 관련 story, type 이름 수정 #11

Merged
merged 2 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ function Badge({ color = 'monoItemBG', children = 'Badge', leftIcon }: BadgeProp
style={{
padding: leftIcon ? '0 8px' : '0 12px',
}}
backgroundColor={color}
$backgroundColor={color}
>
{leftIcon && (
<IconContext.Provider
Expand Down