This commit is contained in:
Hamed
2026-08-01 15:15:34 +04:00
parent 87b518cf4e
commit 9697c98999
50 changed files with 2619 additions and 1 deletions
+21
View File
@@ -0,0 +1,21 @@
'use client';
import { Button, Tooltip } from 'antd';
import { SunOutlined, MoonOutlined } from '@ant-design/icons';
import { useTheme } from '@/app/context/ThemeContext';
export default function ThemeToggle() {
const { theme, toggleTheme } = useTheme();
return (
<Tooltip title={theme === 'dark' ? 'Light mode' : 'Dark mode'}>
<Button
shape="circle"
size="large"
onClick={toggleTheme}
aria-label="toggle theme"
icon={theme === 'dark' ? <SunOutlined /> : <MoonOutlined />}
/>
</Tooltip>
);
}