fix(react/settings): unnecessary top margin

This commit is contained in:
Elian Doran 2025-08-16 00:22:18 +03:00
parent b9b4961f3c
commit 5614891d92
No known key found for this signature in database
2 changed files with 6 additions and 6 deletions

View File

@ -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>
);

View File

@ -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
>