ThemePreact/src/Fab.tsx
2020-04-10 20:08:21 +02:00

20 lines
410 B
TypeScript

import { h, JSX } from "preact";
export default function Fab({
className,
children,
alignLeft,
...props
}: JSX.HTMLAttributes<HTMLButtonElement> & { alignLeft: boolean }) {
let cl = "ht-fab " + (alignLeft ? "ht-fab-left " : "");
return (
<button
className={cl + (className || "") + (props.class || "")}
{...props}
>
{children}
</button>
);
}