Skip to content

Build your personal knowledge base with Trilium Notes

fix(react/settings): unnecessary top margin

Elian Doran5614891d925b
diff --git a/apps/client/src/widgets/type_widgets/options/components/OptionsSection.tsx b/apps/client/src/widgets/type_widgets/options/components/OptionsSection.tsx
index bd3a930e03..7fb3440fa5 100644
--- a/apps/client/src/widgets/type_widgets/options/components/OptionsSection.tsx
+++ b/apps/client/src/widgets/type_widgets/options/components/OptionsSection.tsx
@@ -2,17 +2,17 @@ import type { ComponentChildren } from "preact";
import { CSSProperties } from "preact/compat";
interface OptionsSectionProps {
- title: string;
+ title?: string;
children: ComponentChildren;
noCard?: boolean;
style?: CSSProperties;
+ className?: string;
}
-export default function OptionsSection({ title, children, noCard, style }: OptionsSectionProps) {
+export default function OptionsSection({ title, children, noCard, ...rest }: OptionsSectionProps) {
return (
- <div className={`options-section ${noCard && "tn-no-card"}`} style={style}>
- <h4>{title}</h4>
-
+ <div className={`options-section ${noCard && "tn-no-card"}`} {...rest}>
+ {title && <h4>{title}</h4>}
{children}
</div>
);
diff --git a/apps/client/src/widgets/type_widgets/options/shortcuts.tsx b/apps/client/src/widgets/type_widgets/options/shortcuts.tsx
index e6171f679c..b948902c30 100644
--- a/apps/client/src/widgets/type_widgets/options/shortcuts.tsx
+++ b/apps/client/src/widgets/type_widgets/options/shortcuts.tsx
@@ -36,7 +36,7 @@ export default function ShortcutSettings() {
return (
<OptionsSection
- title={t("shortcuts.keyboard_shortcuts")}
+ className="shortcuts-options-section"
style={{ display: "flex", flexDirection: "column", height: "100%" }}
noCard
>