|
@@ -35,12 +35,35 @@ function App({ children }: PropsWithChildren<React.ReactNode>) {
|
|
|
}}
|
|
|
>
|
|
|
{children}
|
|
|
- <div className="fixed bottom-4 right-4">
|
|
|
- <Button type="primary" onClick={() => changeTheme(darkTheme)}>
|
|
|
- Switch to Dark Theme
|
|
|
+ <div
|
|
|
+ style={{
|
|
|
+ position: 'fixed',
|
|
|
+ top: '50%',
|
|
|
+ right: 16,
|
|
|
+ transform: 'translateY(-50%)',
|
|
|
+ display: 'flex',
|
|
|
+ flexDirection: 'column',
|
|
|
+ gap: 8, // 按钮间距
|
|
|
+ zIndex: 1000,
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ shape="circle"
|
|
|
+ size="large"
|
|
|
+ onClick={() => changeTheme(darkTheme)}
|
|
|
+ title="Switch to Dark Theme"
|
|
|
+ >
|
|
|
+ 🌙
|
|
|
</Button>
|
|
|
- <Button type="primary" onClick={() => changeTheme(lightTheme)}>
|
|
|
- Switch to Light Theme
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ shape="circle"
|
|
|
+ size="large"
|
|
|
+ onClick={() => changeTheme(lightTheme)}
|
|
|
+ title="Switch to Light Theme"
|
|
|
+ >
|
|
|
+ ☀️
|
|
|
</Button>
|
|
|
</div>
|
|
|
</div>
|