mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 02:41:05 +00:00
first commit on the UIShell
This commit is contained in:
parent
0bdae666c4
commit
d3c2732c4c
13 changed files with 492 additions and 0 deletions
38
src/components/UIShell/UIShellRightPanel/ActionLink.svelte
Normal file
38
src/components/UIShell/UIShellRightPanel/ActionLink.svelte
Normal file
|
@ -0,0 +1,38 @@
|
|||
<script>
|
||||
export let action = undefined;
|
||||
// export let type = undefined;
|
||||
// export let icon = undefined;
|
||||
// export let content = undefined;
|
||||
|
||||
// import { onMount } from 'svelte';
|
||||
import { cx } from '../../../lib';
|
||||
import AppSwitcher20 from 'carbon-icons-svelte/lib/AppSwitcher20';
|
||||
import Icon from '../../Icon/Icon.svelte';
|
||||
|
||||
console.log(action);
|
||||
|
||||
$: switcherIconProps =
|
||||
action === 'switcher'
|
||||
? (switcherIconProps = [
|
||||
{
|
||||
class: undefined,
|
||||
skeleton: false,
|
||||
render: AppSwitcher20,
|
||||
title: 'Switcher',
|
||||
tabIndex: 0,
|
||||
focusable: false,
|
||||
style: undefined
|
||||
}
|
||||
])
|
||||
: (switcherIconProps = []);
|
||||
</script>
|
||||
|
||||
{#if action === 'switcher'}
|
||||
<button aria-label="Notifications" class={cx('--header__action')} type="button">
|
||||
<Icon {...switcherIconProps} render={switcherIconProps[0].render} />
|
||||
</button>
|
||||
{:else}
|
||||
<!-- <button aria-label="Notifications" class={cx('--header__action')} type="button">
|
||||
<Icon {...icon} render={icon[0].render} />
|
||||
</button> -->
|
||||
{/if}
|
Loading…
Add table
Add a link
Reference in a new issue