@gsa-tts/graymatter-ui 0.3.18 → 0.3.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -71,18 +71,9 @@ import { toggleNavigation } from '@gsa-tts/graymatter-ui';
71
71
 
72
72
  ## Navigation URL Configuration
73
73
 
74
- Navigation components (`DesktopSideNav`, `MobileBottomNav`) support flexible URL configuration:
74
+ Navigation components (`DesktopSideNav`, `MobileBottomNav`) support flexible URL configuration via props:
75
75
 
76
- ### Option 1: Environment Variables (Recommended)
77
- ```bash
78
- # .env
79
- PUBLIC_CHAT_URL=https://your-chat-app.com
80
- PUBLIC_CONSOLE_URL=https://your-console-app.com
81
- PUBLIC_API_URL=https://your-api-app.com
82
- PUBLIC_DISCOVER_URL=https://your-discover-page.com
83
- ```
84
-
85
- ### Option 2: Component Props (Override Environment)
76
+ ### Option 1: Component Props (Recommended)
86
77
  ```svelte
87
78
  <DesktopSideNav
88
79
  showAppIcons={true}
@@ -96,18 +87,25 @@ PUBLIC_DISCOVER_URL=https://your-discover-page.com
96
87
  </DesktopSideNav>
97
88
  ```
98
89
 
90
+ ### Option 2: Minimal Usage (Uses # fallbacks)
91
+ ```svelte
92
+ <DesktopSideNav showAppIcons={true}>
93
+ <!-- All navigation links will use # as href -->
94
+ </DesktopSideNav>
95
+ ```
96
+
99
97
  ### Option 3: Mixed Approach
100
98
  ```svelte
101
99
  <DesktopSideNav
102
100
  showAppIcons={true}
103
101
  apiUrl="https://custom-api.com"
104
- <!-- chatUrl, consoleUrl, discoverUrl will use environment variables -->
102
+ <!-- chatUrl, consoleUrl, discoverUrl will fallback to # -->
105
103
  >
106
104
  <!-- Sub navigation content -->
107
105
  </DesktopSideNav>
108
106
  ```
109
107
 
110
- **Priority Order:** Component props Environment variables Fallback (`#`)
108
+ **Fallback Behavior:** When no URL is provided for a navigation item, it will use `#` as the href, preventing navigation and keeping users on the current page.
111
109
 
112
110
  ### Discover Icon Control
113
111