fix: scope rail nav-label hiding to sidebar and fall back fab-only to sidebar on desktop
This commit is contained in:
@@ -83,14 +83,13 @@ export const DEFAULT_THEME: ThemeState = {
|
||||
|
||||
// Map our nav style preference to the data-nav attribute we set on <html>.
|
||||
// On mobile (handled by NavModeProvider) we override to "bottom" or "fab".
|
||||
// fab-only has no desktop equivalent — falls back to sidebar so the nav doesn't disappear.
|
||||
export function navStyleToDataNav(style: NavStyle): "sidebar" | "rail" | "top" | "fab" {
|
||||
switch (style) {
|
||||
case "compact-rail":
|
||||
return "rail";
|
||||
case "top-nav":
|
||||
return "top";
|
||||
case "fab-only":
|
||||
return "fab";
|
||||
default:
|
||||
return "sidebar";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user