feat: 헤더에 테마 전환 버튼 배치
Co-Authored-By: Claude Opus 5
@c3e89f703d2f60ce5a7c738cc31264e7a67f66b4
--- app/(protected)/(basic)/_components/admin-header.tsx
+++ app/(protected)/(basic)/_components/admin-header.tsx
... | ... | @@ -1,4 +1,5 @@ |
| 1 | 1 |
import { logout } from '@/app/(protected)/_actions';
|
| 2 |
+import { ThemeToggleButton } from '@/app/(protected)/(basic)/_components/theme-toggle-button';
|
|
| 2 | 3 |
import { Header } from '@/components/ui/header';
|
| 3 | 4 |
|
| 4 | 5 |
interface AdminHeaderProps {
|
... | ... | @@ -8,8 +9,9 @@ |
| 8 | 9 |
|
| 9 | 10 |
/** |
| 10 | 11 |
* 헤더 배치 — 비주얼 셸(Header)은 design 공용 컴포넌트를 그대로 쓰고, 사이드바 토글 버튼(공용 |
| 11 |
- * 컴포넌트가 제공하지 않는 상호작용)만 `leading` 슬롯에 주입한다. 로그아웃은 `children`(우측 |
|
| 12 |
- * 슬롯)에 주입한다. |
|
| 12 |
+ * 컴포넌트가 제공하지 않는 상호작용)만 `leading` 슬롯에 주입한다. 테마 토글과 로그아웃은 |
|
| 13 |
+ * `children`(우측 슬롯)에 주입한다 — 테마 토글이 로그아웃 왼쪽에 오도록 DOM 순서를 그대로 |
|
| 14 |
+ * 시각 순서로 사용한다(Tab 포커스 순서도 동일하게 따라간다). |
|
| 13 | 15 |
*/ |
| 14 | 16 |
export function AdminHeader({
|
| 15 | 17 |
onOpenSidebar, |
... | ... | @@ -41,6 +43,7 @@ |
| 41 | 43 |
</> |
| 42 | 44 |
} |
| 43 | 45 |
> |
| 46 |
+ <ThemeToggleButton /> |
|
| 44 | 47 |
<form action={logout}>
|
| 45 | 48 |
<button |
| 46 | 49 |
type="submit" |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?