diff --git a/src/components/modules/moduleWrapper.tsx b/src/components/modules/moduleWrapper.tsx index dada02e2e..0afc0dc85 100644 --- a/src/components/modules/moduleWrapper.tsx +++ b/src/components/modules/moduleWrapper.tsx @@ -1,4 +1,4 @@ -import { Card, Menu, Switch, useMantineTheme } from '@mantine/core'; +import { Button, Card, Group, Menu, Switch, TextInput, useMantineTheme } from '@mantine/core'; import { useConfig } from '../../tools/state'; import { IModule } from './modules'; @@ -19,13 +19,51 @@ export function ModuleWrapper(props: any) { types.forEach((type, index) => { const optionName = `${module.title}.${keys[index]}`; const moduleInConfig = config.modules?.[module.title]; + if (type === 'string') { + items.push( +
{ + e.preventDefault(); + setConfig({ + ...config, + modules: { + ...config.modules, + [module.title]: { + ...config.modules[module.title], + options: { + ...config.modules[module.title].options, + [keys[index]]: { + ...config.modules[module.title].options[keys[index]], + value: (e.target as any)[0].value, + }, + }, + }, + }, + }); + }} + > + + {}} + /> + + + +
+ ); + } // TODO: Add support for other types if (type === 'boolean') { items.push( { @@ -59,7 +97,7 @@ export function ModuleWrapper(props: any) {