mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-17 05:07:23 +08:00
### What problem does this PR solve? - Adjust UI styles in **Dataset** pages. - Adjust several shared components styles - Modify files and directory structure in `src/layouts` ### Type of change - [x] Refactoring
23 lines
583 B
TypeScript
23 lines
583 B
TypeScript
import { LucideMoon, LucideSun } from 'lucide-react';
|
|
|
|
import { useTheme } from '@/components/theme-provider';
|
|
import { Button } from '@/components/ui/button';
|
|
import { ThemeEnum } from '@/constants/common';
|
|
|
|
export default function ThemeButton() {
|
|
const { setTheme, theme } = useTheme();
|
|
|
|
return (
|
|
<Button
|
|
variant="ghost"
|
|
size="icon"
|
|
className="relative"
|
|
onClick={() =>
|
|
setTheme(theme === ThemeEnum.Dark ? ThemeEnum.Light : ThemeEnum.Dark)
|
|
}
|
|
>
|
|
{theme === ThemeEnum.Light ? <LucideSun /> : <LucideMoon />}
|
|
</Button>
|
|
);
|
|
}
|