Skip to content

Commit a5a27ef

Browse files
authored
Merge pull request #3 from andresin87/remove-icon-in-button
removed the icons in the button
2 parents 349de14 + e7e3bd9 commit a5a27ef

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

src/components/Button.tsx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,10 @@ export const Button = ({
4141
variant = "primary",
4242
size = "lg",
4343
disabled = false,
44-
startIcon = <SvgShoppingBag />,
45-
endIcon = <SvgArrowRight />,
4644
children,
4745
...props
4846
}: ButtonProps) => {
4947

50-
const renderIcon = (icon: React.ReactNode) => {
51-
if (React.isValidElement<{ className?: string }>(icon)) {
52-
return React.cloneElement(icon, { className: `icon--${size}` });
53-
}
54-
return null;
55-
};
56-
5748
return (
5849
<button
5950
type="button"
@@ -62,9 +53,7 @@ export const Button = ({
6253
aria-disabled={disabled}
6354
{...props}
6455
>
65-
{renderIcon(startIcon)}
6656
{children}
67-
{renderIcon(endIcon)}
6857
</button>
6958
);
7059
};

0 commit comments

Comments
 (0)