Revert "feat(options/spellcheck): merge into single card"

This reverts commit 7b056fe1af.
This commit is contained in:
Elian Doran
2026-04-06 21:53:17 +03:00
parent a70142a4dc
commit 00023adbc0
3 changed files with 5 additions and 16 deletions

View File

@@ -45,12 +45,3 @@
.option-row.centered {
justify-content: center;
}
.option-row.full-width {
flex-direction: column;
align-items: stretch;
}
.option-row.full-width .option-row-input {
flex-shrink: unset;
}

View File

@@ -8,15 +8,14 @@ interface OptionsRowProps {
description?: string;
children: VNode;
centered?: boolean;
fullWidth?: boolean;
}
export default function OptionsRow({ name, label, description, children, centered, fullWidth }: OptionsRowProps) {
export default function OptionsRow({ name, label, description, children, centered }: OptionsRowProps) {
const id = useUniqueName(name);
const childWithId = cloneElement(children, { id });
return (
<div className={`option-row ${centered ? "centered" : ""} ${fullWidth ? "full-width" : ""}`}>
<div className={`option-row ${centered ? "centered" : ""}`}>
<div className="option-row-label">
{label && <label for={id}>{label}</label>}
{description && <small className="option-row-description">{description}</small>}

View File

@@ -38,10 +38,9 @@ function ElectronSpellcheckSettings() {
onChange={setSpellCheckEnabled}
/>
</OptionsRow>
{spellCheckEnabled && <SpellcheckLanguages />}
</OptionsSection>
{spellCheckEnabled && <SpellcheckLanguages />}
{spellCheckEnabled && <CustomDictionary />}
</>
);
@@ -78,7 +77,7 @@ function SpellcheckLanguages() {
}, []);
return (
<OptionsRow name="spell-check-languages" label={t("spellcheck.language_code_label")} fullWidth>
<OptionsSection title={t("spellcheck.language_code_label")}>
<CheckboxList
values={availableLanguages}
keyProperty="code" titleProperty="name"
@@ -86,7 +85,7 @@ function SpellcheckLanguages() {
onChange={setSelectedCodes}
columnWidth="200px"
/>
</OptionsRow>
</OptionsSection>
);
}