Files
cozsweet-frontend-nextjs/src/core/breakpoints.ts
T
admin 0ffc961e00 refactor(core): consolidate core files under src/core directory
Move breakpoints, fonts, and app_constants into the core directory for better organization:
- Move src/lib/breakpoints.ts to src/core/breakpoints.ts
- Move src/lib/fonts.ts to src/core/fonts.ts
- Move src/core/constants/app_constants.ts to src/core/app_constants.ts and clean up outdated comments
2026-06-11 18:16:08 +08:00

22 lines
641 B
TypeScript

/**
* 响应式断点常量
*
* 原始 Dart: lib/ui/core/responsive.dart
*
* 与 `src/design/breakpoints.css` 中的 CSS 变量保持一致:
* - 客户端运行时检查(matchMedia)通过 `useBreakpoint` hook
* - 服务端 / 客户端 CSS 通过 `src/design/breakpoints.css` 的 media query
*/
export const Breakpoints = {
/** 手机设备最大宽度 */
mobileMaxWidth: 500,
/** 平板设备最小宽度 */
tabletMinWidth: 600,
/** 平板设备最大宽度 */
tabletMaxWidth: 1023,
/** 桌面设备最小宽度 */
desktopMinWidth: 1024,
} as const;
export type DeviceSize = "mobile" | "tablet" | "desktop";