UNPKG

@lobehub/ui

Version:

Lobe UI is an open-source UI component library for building AIGC web apps

18 lines (17 loc) • 449 B
//#region src/dashboard/FilterSidebar/width.ts const MIN_WIDTH = 200; const MAX_WIDTH = 480; function clampSidebarWidth(width, fallback) { if (!Number.isFinite(width)) return fallback; return Math.min(MAX_WIDTH, Math.max(MIN_WIDTH, Math.round(width))); } const sidebarWidth = { collapse: 80, max: MAX_WIDTH, min: MIN_WIDTH, narrow: 264, wide: 300 }; //#endregion export { clampSidebarWidth, sidebarWidth }; //# sourceMappingURL=width.mjs.map