mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
32 lines
1 KiB
Svelte
32 lines
1 KiB
Svelte
<script>
|
|
export let uiShellAriaLabel = undefined;
|
|
export let href = undefined;
|
|
export let company = undefined;
|
|
export let platformName = undefined;
|
|
export let navMenu = undefined;
|
|
export let rightPanel = undefined;
|
|
|
|
import { cx } from '../../lib';
|
|
import UIShellNavWrapper from './UIShellNav/UIShellNavWrapper.svelte';
|
|
import UIShellNavItem from './UIShellNav/UIShellNavItem.svelte';
|
|
import UIShellRightPanel from './UIShellRightPanel/UIShellRightPanel.svelte';
|
|
|
|
$: ariaLabel = 'IBM ' + (uiShellAriaLabel || $$props['aria-label'] || platformName);
|
|
</script>
|
|
|
|
<header aria-label={ariaLabel} class={cx('--header')} role="banner">
|
|
<a class={cx('--header__name')} {href}>
|
|
<span class={cx('--header__name--prefix')}>{company}</span>
|
|
{platformName}
|
|
</a>
|
|
{#if navMenu}
|
|
<UIShellNavWrapper ariaLabel>
|
|
{#each navMenu as itemMenu}
|
|
<UIShellNavItem {...itemMenu} />
|
|
{/each}
|
|
</UIShellNavWrapper>
|
|
{/if}
|
|
{#if rightPanel}
|
|
<UIShellRightPanel {rightPanel} />
|
|
{/if}
|
|
</header>
|