Added a background image input

Added an input in the advanced options for a background image. Also removed an unused import from my previous commit and changed the margin on the header bar to padding instead.
This commit is contained in:
Aimsucks
2022-06-07 17:36:05 +00:00
parent 901798055b
commit 423f8110b9
7 changed files with 33 additions and 3 deletions

View File

@@ -10,10 +10,16 @@ export default function TitleChanger() {
title: config.settings.title,
logo: config.settings.logo,
favicon: config.settings.favicon,
background: config.settings.background,
},
});
const saveChanges = (values: { title?: string; logo?: string; favicon?: string }) => {
const saveChanges = (values: {
title?: string;
logo?: string;
favicon?: string;
background?: string;
}) => {
setConfig({
...config,
settings: {
@@ -21,6 +27,7 @@ export default function TitleChanger() {
title: values.title,
logo: values.logo,
favicon: values.favicon,
background: values.background,
},
});
};
@@ -36,6 +43,7 @@ export default function TitleChanger() {
placeholder="/favicon.svg"
{...form.getInputProps('favicon')}
/>
<TextInput label="Background" placeholder="" {...form.getInputProps('background')} />
<Button type="submit" color={config.settings.primary_color || 'red'}>
Save
</Button>