Fix some problems with class and className

This commit is contained in:
Fabian Stamm
2020-04-21 00:47:38 +02:00
parent 3833510262
commit 81f124378f
12 changed files with 50 additions and 42 deletions

View File

@ -2,13 +2,12 @@ import { h, JSX } from "preact";
export default function IconButton({
children,
className,
class: c,
...props
}: JSX.HTMLAttributes<HTMLButtonElement>) {
return (
<button
className={
"ht-btn ht-btn-icon " + (className || "") + (props.class || "")
}
className={"ht-btn ht-btn-icon " + (className || "") + (c || "")}
{...props}
>
{children}