mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-11 16:05:47 +01:00
Style settings scrollarea
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import { ScrollArea, Space, Stack, Text } from '@mantine/core';
|
import { ScrollArea, Space, Stack, Text } from '@mantine/core';
|
||||||
|
import { useElementSize, useViewportSize } from '@mantine/hooks';
|
||||||
import { useConfigContext } from '../../../config/provider';
|
import { useConfigContext } from '../../../config/provider';
|
||||||
import ConfigChanger from '../../Config/ConfigChanger';
|
import ConfigChanger from '../../Config/ConfigChanger';
|
||||||
import ConfigActions from './Config/ConfigActions';
|
import ConfigActions from './Config/ConfigActions';
|
||||||
@@ -7,6 +8,7 @@ import { SearchEngineSelector } from './SearchEngine/SearchEngineSelector';
|
|||||||
|
|
||||||
export default function CommonSettings() {
|
export default function CommonSettings() {
|
||||||
const { config } = useConfigContext();
|
const { config } = useConfigContext();
|
||||||
|
const { height, width } = useViewportSize();
|
||||||
|
|
||||||
if (!config) {
|
if (!config) {
|
||||||
return (
|
return (
|
||||||
@@ -15,16 +17,15 @@ export default function CommonSettings() {
|
|||||||
</Text>
|
</Text>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack mb="md" mt="xs">
|
<ScrollArea style={{ height: height - 100 }} offsetScrollbars>
|
||||||
<ScrollArea style={{ height: '76vh' }} offsetScrollbars>
|
<Stack>
|
||||||
<SearchEngineSelector searchEngine={config.settings.common.searchEngine} />
|
<SearchEngineSelector searchEngine={config.settings.common.searchEngine} />
|
||||||
<Space />
|
<Space />
|
||||||
<LanguageSelect />
|
<LanguageSelect />
|
||||||
<ConfigChanger />
|
<ConfigChanger />
|
||||||
<ConfigActions />
|
<ConfigActions />
|
||||||
</ScrollArea>
|
</Stack>
|
||||||
</Stack>
|
</ScrollArea>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user