ThemePreact/src/Fab.tsx

20 lines
410 B
TypeScript
Raw Normal View History

2020-03-29 16:05:39 +02:00
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 (
2020-04-10 20:08:21 +02:00
<button
className={cl + (className || "") + (props.class || "")}
{...props}
>
2020-03-29 16:05:39 +02:00
{children}
</button>
);
}