mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 21:36:05 +01:00
feat(website): add icons for donate buttons
This commit is contained in:
23
apps/website/src/components/Button.tsx
Normal file
23
apps/website/src/components/Button.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
import { ComponentChildren } from "preact";
|
||||
import Icon from "./Icon";
|
||||
import "./Button.css";
|
||||
|
||||
interface ButtonProps {
|
||||
href?: string;
|
||||
iconSvg?: string;
|
||||
text: ComponentChildren;
|
||||
openExternally?: boolean;
|
||||
}
|
||||
|
||||
export default function Button({ href, iconSvg, openExternally, text }: ButtonProps) {
|
||||
return (
|
||||
<a
|
||||
className="button"
|
||||
href={href}
|
||||
target={openExternally ? "_blank" : undefined}
|
||||
>
|
||||
{iconSvg && <><Icon svg={iconSvg} />{" "}</>}
|
||||
{text}
|
||||
</a>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user