mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 15:19:01 +02:00
style/launcher: tweak the left pane toggle button
This commit is contained in:
parent
6fd37c4c8d
commit
fba51f2cd0
25
apps/client/src/widgets/buttons/left_pane_toggle.css
Normal file
25
apps/client/src/widgets/buttons/left_pane_toggle.css
Normal file
@ -0,0 +1,25 @@
|
||||
@keyframes left-pane-toggle-button-expand {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
} to {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes left-pane-toggle-button-collapse {
|
||||
from {
|
||||
transform: rotate(180deg);
|
||||
} to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.layout-vertical .left-pane-toggle-button.action-collapse::before {
|
||||
transform: rotate(360deg);
|
||||
animation: left-pane-toggle-button-collapse 250ms linear;
|
||||
}
|
||||
|
||||
.layout-vertical .left-pane-toggle-button.action-expand::before {
|
||||
transform: rotate(180deg);
|
||||
animation: left-pane-toggle-button-expand 250ms linear;
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
import "./left_pane_toggle.css";
|
||||
import { useEffect, useState } from "preact/hooks";
|
||||
import ActionButton from "../react/ActionButton";
|
||||
import options from "../../services/options";
|
||||
@ -18,12 +19,10 @@ export default function LeftPaneToggle({ isHorizontalLayout }: { isHorizontalLay
|
||||
|
||||
return (
|
||||
<ActionButton
|
||||
className={`${isHorizontalLayout ? "toggle-button" : "launcher-button"}`}
|
||||
className={`${isHorizontalLayout ? "toggle-button" : "launcher-button"} left-pane-toggle-button ${currentLeftPaneVisible ? "action-collapse" : "action-expand"}`}
|
||||
text={currentLeftPaneVisible ? t("left_pane_toggle.hide_panel") : t("left_pane_toggle.show_panel")}
|
||||
triggerCommand={currentLeftPaneVisible ? "hideLeftPane" : "showLeftPane"}
|
||||
icon={isHorizontalLayout
|
||||
? "bx bx-sidebar"
|
||||
: (currentLeftPaneVisible ? "bx bx-chevrons-left" : "bx bx-chevrons-right" )}
|
||||
icon={isHorizontalLayout ? "bx bx-sidebar" : "bx bx-chevrons-left"}
|
||||
/>
|
||||
)
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user