mirror of
https://github.com/zadam/trilium.git
synced 2025-12-08 08:24:24 +01:00
19 lines
576 B
TypeScript
19 lines
576 B
TypeScript
import { useContext } from "preact/hooks";
|
|
import ActionButton from "../react/ActionButton";
|
|
import { ParentComponent } from "../react/react_utils";
|
|
import { t } from "../../services/i18n";
|
|
|
|
export default function ToggleSidebarButton() {
|
|
const parentComponent = useContext(ParentComponent);
|
|
|
|
return (
|
|
<ActionButton
|
|
icon="bx bx-sidebar"
|
|
text={t("note_tree.toggle-sidebar")}
|
|
onClick={() => parentComponent?.triggerCommand("setActiveScreen", {
|
|
screen: "tree"
|
|
})}
|
|
/>
|
|
)
|
|
}
|