feat: move environment selector into TopBar (DS v0.1.30)
Update @cameleer/design-system to v0.1.30 which accepts ReactNode for the environment prop. Move EnvironmentSelector from standalone div into TopBar, rendering between theme toggle and user menu. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -702,7 +702,13 @@ function LayoutContent() {
|
||||
<AppShell sidebar={sidebarElement}>
|
||||
<TopBar
|
||||
breadcrumb={breadcrumb}
|
||||
environment={selectedEnv}
|
||||
environment={environments.length > 0 ? (
|
||||
<EnvironmentSelector
|
||||
environments={environments}
|
||||
value={selectedEnv}
|
||||
onChange={setSelectedEnv}
|
||||
/>
|
||||
) : undefined}
|
||||
user={username ? { name: username } : undefined}
|
||||
onLogout={handleLogout}
|
||||
/>
|
||||
@@ -717,16 +723,6 @@ function LayoutContent() {
|
||||
data={searchData}
|
||||
/>
|
||||
|
||||
{!isAdminPage && environments.length > 0 && (
|
||||
<div style={{ display: 'flex', justifyContent: 'flex-end', padding: '4px 1.5rem 0' }}>
|
||||
<EnvironmentSelector
|
||||
environments={environments}
|
||||
value={selectedEnv}
|
||||
onChange={setSelectedEnv}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{!isAdminPage && (
|
||||
<ContentTabs active={scope.tab} onChange={setTab} scope={scope} />
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user