diff --git a/package.json b/package.json index 51b0740..e69965b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@hibas123/theme-preact", - "version": "1.0.6", + "version": "1.0.7", "description": "", "main": "out/index.js", "dependencies": { diff --git a/src/Button.tsx b/src/Button.tsx index 19aefa5..739bf56 100644 --- a/src/Button.tsx +++ b/src/Button.tsx @@ -16,11 +16,12 @@ export default function Button({ children, format, className, + class: c, ...props }: IButtonProps) { let cl = "ht-btn"; - if (className) cl += " " + (className || "") + (props.class || ""); + if (className) cl += " " + (className || "") + (c || ""); switch (format) { case ButtonFormats.DEFAULT: diff --git a/src/Card.tsx b/src/Card.tsx index 145f838..5b286c9 100644 --- a/src/Card.tsx +++ b/src/Card.tsx @@ -1,14 +1,12 @@ import { h, JSX } from "preact"; export default function Card({ className, + class: c, children, ...props }: JSX.HTMLAttributes) { return ( -
+
{children}
); diff --git a/src/Container.tsx b/src/Container.tsx index 73eaaf3..774255a 100644 --- a/src/Container.tsx +++ b/src/Container.tsx @@ -2,11 +2,12 @@ import { h, JSX } from "preact"; export default function Container({ className, children, + class: c, ...props }: JSX.HTMLAttributes) { return (
{children} diff --git a/src/Fab.tsx b/src/Fab.tsx index f1bd30e..3a69886 100644 --- a/src/Fab.tsx +++ b/src/Fab.tsx @@ -4,15 +4,15 @@ export default function Fab({ className, children, alignLeft, + class: c, ...props -}: JSX.HTMLAttributes & { alignLeft: boolean }) { +}: JSX.HTMLAttributes & { + alignLeft: boolean; +}) { let cl = "ht-fab " + (alignLeft ? "ht-fab-left " : ""); return ( - ); diff --git a/src/Header.tsx b/src/Header.tsx index 3dc4190..21f9b0d 100644 --- a/src/Header.tsx +++ b/src/Header.tsx @@ -5,11 +5,12 @@ import { h, JSX } from "preact"; export default function Header({ children, className, + class: c, ...props }: JSX.HTMLAttributes) { return (
{children} diff --git a/src/IconButton.tsx b/src/IconButton.tsx index f296edb..e12393a 100644 --- a/src/IconButton.tsx +++ b/src/IconButton.tsx @@ -2,13 +2,12 @@ import { h, JSX } from "preact"; export default function IconButton({ children, className, + class: c, ...props }: JSX.HTMLAttributes) { return (