Files
Trilium/apps/client/src/widgets/react/ActionButton.tsx
2025-08-24 22:56:47 +03:00

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}
/>;
}