diff --git a/src/components/Button/Button.jsx b/src/components/Button/Button.jsx index 3e6d582ae3..6aa8736e6c 100644 --- a/src/components/Button/Button.jsx +++ b/src/components/Button/Button.jsx @@ -209,24 +209,18 @@ const Button = forwardRef( const leftIconSize = useMemo(() => { if (typeof leftIcon !== "function") return; - if (size === SIZES.SMALL) return "20"; - if (size === SIZES.MEDIUM) return "24"; return "24"; - }, [leftIcon, size]); + }, [leftIcon]); const rightIconSize = useMemo(() => { if (typeof rightIcon !== "function") return; - if (size === SIZES.SMALL) return "20"; - if (size === SIZES.MEDIUM) return "24"; return "24"; - }, [rightIcon, size]); + }, [rightIcon]); const successIconSize = useMemo(() => { if (typeof successIcon !== "function") return; - if (size === SIZES.SMALL) return "20"; - if (size === SIZES.MEDIUM) return "24"; return "24"; - }, [successIcon, size]); + }, [successIcon]); if (loading) { return (