Files
Trilium/apps/client/src/widgets/react/ActionButton.tsx

19 lines
571 B
TypeScript
Raw Normal View History

import { CommandNames } from "../../components/app_context";
interface ActionButtonProps {
text: string;
titlePosition?: "bottom"; // TODO: Use it
icon: string;
className?: string;
2025-08-23 19:48:01 +03:00
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}
/>;
}