mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-05 15:44:21 +00:00
25 lines
731 B
JavaScript
25 lines
731 B
JavaScript
import React from 'react';
|
|
import { Text, Switch, Group, Box, Title } from '@mantine/core';
|
|
import { useWorkspace } from '../../../contexts/WorkspaceContext';
|
|
|
|
const AppearanceSettings = ({ themeSettings, onThemeChange }) => {
|
|
const { colorScheme, updateColorScheme } = useWorkspace();
|
|
|
|
const handleThemeChange = () => {
|
|
const newTheme = colorScheme === 'dark' ? 'light' : 'dark';
|
|
updateColorScheme(newTheme);
|
|
onThemeChange(newTheme);
|
|
};
|
|
|
|
return (
|
|
<Box mb="md">
|
|
<Group justify="space-between" align="center">
|
|
<Text size="sm">Dark Mode</Text>
|
|
<Switch checked={colorScheme === 'dark'} onChange={handleThemeChange} />
|
|
</Group>
|
|
</Box>
|
|
);
|
|
};
|
|
|
|
export default AppearanceSettings;
|