mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-08 13:00:13 +02:00
8430b1ec95
* Add updated i18n config and en locale
30 lines
740 B
TypeScript
30 lines
740 B
TypeScript
import { ReactNode } from 'react';
|
|
import { SettingsOptions } from '/@/renderer/features/settings/components/settings-option';
|
|
|
|
export type SettingOption = {
|
|
control: ReactNode;
|
|
description: string | ReactNode;
|
|
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={`option-${option.title}`}
|
|
{...option}
|
|
/>
|
|
))}
|
|
</>
|
|
);
|
|
};
|