mirror of
https://github.com/zadam/trilium.git
synced 2025-11-11 15:55:52 +01:00
19 lines
571 B
TypeScript
19 lines
571 B
TypeScript
import { CommandNames } from "../../components/app_context";
|
|
|
|
interface ActionButtonProps {
|
|
text: string;
|
|
titlePosition?: "bottom"; // TODO: Use it
|
|
icon: string;
|
|
className?: string;
|
|
onClick?: (e: MouseEvent) => void;
|
|
triggerCommand?: CommandNames;
|
|
}
|
|
|
|
export default function ActionButton({ text, icon, className, onClick, triggerCommand }: ActionButtonProps) {
|
|
return <button
|
|
class={`icon-action ${icon} ${className ?? ""}`}
|
|
title={text}
|
|
onClick={onClick}
|
|
data-trigger-command={triggerCommand}
|
|
/>;
|
|
} |