From 2d8859ead4a8b1a5dba677e00075fd538864aaca Mon Sep 17 00:00:00 2001 From: danidfra Date: Sat, 15 Mar 2025 15:05:26 -0300 Subject: [PATCH] Add iconClassName prop in Button --- src/components/ui/button.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsx index d401fcc2c..d8206f391 100644 --- a/src/components/ui/button.tsx +++ b/src/components/ui/button.tsx @@ -14,6 +14,8 @@ interface IButton { children?: React.ReactNode; /** Extra class names for the button. */ className?: string; + /** Extra class names for the icon. */ + iconClassName?: string; /** Prevent the button from being clicked. */ disabled?: boolean; /** Specifies the icon element as 'svg' or 'img'. */ @@ -49,6 +51,7 @@ const Button = forwardRef((props, ref): JSX.Element to, type = 'button', className, + iconClassName, } = props; const body = text || children; @@ -65,7 +68,7 @@ const Button = forwardRef((props, ref): JSX.Element return null; } - return ; + return ; }; const handleClick: React.MouseEventHandler = useCallback((event) => {