Skip to content

Commit

Permalink
fix: 아이콘 적용 버그 문제 해결 (#942)
Browse files Browse the repository at this point in the history
* fix: 잘못 적용된 Icon 수정

* feat: IconSetting component 구현
  • Loading branch information
Todari authored Jan 15, 2025
1 parent add648f commit 152f35b
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 12 deletions.
11 changes: 11 additions & 0 deletions client/src/assets/image/setting.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ const EditableAmount = ({value, onChange, onClick, readOnly = true, isFixed = fa
<Text size="tiny" textColor="gray">
</Text>
{onClick && <IconEdit size={16} />}
</div>
{onClick && <IconEdit />}
</div>

<span
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Design/components/Banner/Banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const Banner = ({title, description, buttonText, onDelete, ...buttonProps}: Bann
style={{display: 'flex', alignItems: 'flex-start'}}
aria-label="배너 닫기"
>
<IconX />
<IconX size={12} />
</IconButton>
<div>
<Text size="captionBold" color="onTertiary">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const DepositCheck: React.FC<DepositCheckProps> = ({isDeposited = false}: Deposi
<Text size="tiny" className="deposit-check-text">
입금
</Text>
{isDeposited ? <IconCheck size={12} color="primary" /> : <IconX color="gray" />}
{isDeposited ? <IconCheck size={12} color="primary" /> : <IconX size={12} color="gray" />}
</div>
);
};
Expand Down
21 changes: 13 additions & 8 deletions client/src/components/Design/components/Icons/Icon.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {IconKakao} from './Icons/IconKakao';
import {IconMeatballs} from './Icons/IconMeatballs';
import {IconPictureSquare} from './Icons/IconPictureSquare';
import {IconSearch} from './Icons/IconSearch';
import {IconSetting} from './Icons/IconSetting';
import {IconTrash} from './Icons/IconTrash';
import {IconX} from './Icons/IconX';
import {IconXCircle} from './Icons/IconXCircle';
Expand Down Expand Up @@ -101,14 +102,6 @@ export const Error: Story = {
),
};

export const X: Story = {
render: (args: React.ComponentProps<typeof IconX>) => <IconShowcase IconComponent={IconX} args={args} />,
};

export const XCircle: Story = {
render: (args: React.ComponentProps<typeof IconXCircle>) => <IconShowcase IconComponent={IconXCircle} args={args} />,
};

export const Kakao: Story = {
render: (args: React.ComponentProps<typeof IconKakao>) => <IconShowcase IconComponent={IconKakao} args={args} />,
};
Expand All @@ -129,6 +122,18 @@ export const Search: Story = {
render: (args: React.ComponentProps<typeof IconSearch>) => <IconShowcase IconComponent={IconSearch} args={args} />,
};

export const Setting: Story = {
render: (args: React.ComponentProps<typeof IconSetting>) => <IconShowcase IconComponent={IconSetting} args={args} />,
};

export const Trash: Story = {
render: (args: React.ComponentProps<typeof IconTrash>) => <IconShowcase IconComponent={IconTrash} args={args} />,
};

export const X: Story = {
render: (args: React.ComponentProps<typeof IconX>) => <IconShowcase IconComponent={IconX} args={args} />,
};

export const XCircle: Story = {
render: (args: React.ComponentProps<typeof IconXCircle>) => <IconShowcase IconComponent={IconXCircle} args={args} />,
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/** @jsxImportSource @emotion/react */
import IconSettingSvg from '@assets/image/setting.svg';

import {SvgProps} from '../Icon.type';
import Svg from '../Svg';

export const IconSetting = ({color = 'black', ...rest}: Omit<SvgProps, 'children'>) => {
return (
<Svg color={color} {...rest}>
<IconSettingSvg />
</Svg>
);
};
3 changes: 2 additions & 1 deletion client/src/components/Design/components/Top/EditableLine.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export default function EditableLine({value, onChange}: Props) {
css={css`
display: flex;
gap: 0.5rem;
align-items: center;
`}
>
<input
Expand All @@ -48,7 +49,7 @@ export default function EditableLine({value, onChange}: Props) {
value={value}
onChange={onChange}
/>
<IconEdit />
<IconEdit size={16} />
</div>

<span
Expand Down

0 comments on commit 152f35b

Please sign in to comment.