trilium/apps/client/src/widgets/react/HelpButton.tsx
2025-08-22 15:40:36 +03:00

21 lines
610 B
TypeScript

import { CSSProperties } from "preact/compat";
import { t } from "../../services/i18n";
import { openInAppHelpFromUrl } from "../../services/utils";
interface HelpButtonProps {
className?: string;
helpPage: string;
style?: CSSProperties;
}
export default function HelpButton({ className, helpPage, style }: HelpButtonProps) {
return (
<button
class={`${className ?? ""} icon-action bx bx-help-circle`}
type="button"
onClick={() => openInAppHelpFromUrl(helpPage)}
title={t("open-help-page")}
style={style}
/>
);
}