Fix empty classname resulting in undefined class of result element

This commit is contained in:
Fabian Stamm
2020-04-10 19:58:41 +02:00
parent b56e59f6d4
commit 3dbbc5b67a
10 changed files with 20 additions and 18 deletions

View File

@ -5,7 +5,7 @@ export default function IconButton({
...props
}: JSX.HTMLAttributes<HTMLButtonElement>) {
return (
<button className={"ht-btn ht-btn-icon " + className} {...props}>
<button className={"ht-btn ht-btn-icon " + (className || "")} {...props}>
{children}
</button>
);