Refactor settings store and components

This commit is contained in:
jeffvli
2023-03-30 06:44:33 -07:00
parent 373441e4c6
commit eecbcddea3
30 changed files with 894 additions and 832 deletions
@@ -0,0 +1,28 @@
import { SettingsOptions } from '/@/renderer/features/settings/components/settings-option';
export type SettingOption = {
control: JSX.Element;
description: string | JSX.Element;
isHidden?: boolean;
note?: string;
title: string;
};
interface SettingsSectionProps {
options: SettingOption[];
}
export const SettingsSection = ({ options }: SettingsSectionProps) => {
return (
<>
{options
.filter((o) => !o.isHidden)
.map((option) => (
<SettingsOptions
key={`general-${option.title}`}
{...option}
/>
))}
</>
);
};