mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-12 08:25:47 +01:00
💄 Change module enabler layout
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Group, Switch } from '@mantine/core';
|
||||
import { Checkbox, Group, SimpleGrid, Title } from '@mantine/core';
|
||||
import * as Modules from '../modules';
|
||||
import { useConfig } from '../../tools/state';
|
||||
|
||||
@@ -7,12 +7,14 @@ export default function ModuleEnabler(props: any) {
|
||||
const modules = Object.values(Modules).map((module) => module);
|
||||
return (
|
||||
<Group direction="column">
|
||||
<Title order={4}>Module enabler</Title>
|
||||
<SimpleGrid cols={3} spacing="xl">
|
||||
{modules.map((module) => (
|
||||
<Switch
|
||||
<Checkbox
|
||||
key={module.title}
|
||||
size="md"
|
||||
checked={config.modules?.[module.title]?.enabled ?? false}
|
||||
label={`Enable ${module.title}`}
|
||||
label={`${module.title}`}
|
||||
onChange={(e) => {
|
||||
setConfig({
|
||||
...config,
|
||||
@@ -27,6 +29,7 @@ export default function ModuleEnabler(props: any) {
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
</SimpleGrid>
|
||||
</Group>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user