feat(ui): initialize base nova design system

This commit is contained in:
2026-08-28 16:29:07 +00:00 Unverified
parent d3b09a4e70
commit 56cfdd99e5
43 changed files with 5368 additions and 26 deletions
+17
View File
@@ -0,0 +1,17 @@
import { useSyncExternalStore } from "react"
const MOBILE_BREAKPOINT = 768
function subscribe(onChange: () => void) {
const query = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`)
query.addEventListener("change", onChange)
return () => query.removeEventListener("change", onChange)
}
function getSnapshot() {
return window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`).matches
}
export function useIsMobile() {
return useSyncExternalStore(subscribe, getSnapshot, () => false)
}