@enki-tek/fms-web-components 0.0.56 → 0.0.58
Sign up to get free protection for your applications and to get access to all the features.
- package/components/Header/Brand.svelte +3 -0
- package/components/Header/Header.scss +5 -0
- package/components/Header/Header.svelte +3 -0
- package/components/Header/HeaderItem.svelte +15 -2
- package/components/Header/HeaderItem.svelte.d.ts +2 -0
- package/components/Header/UserAvatar.svelte +3 -0
- package/components/Icon/Icon.svelte +1 -1
- package/package.json +1 -1
@@ -4,12 +4,22 @@
|
|
4
4
|
NavLink,
|
5
5
|
Icon
|
6
6
|
} from 'sveltestrap';
|
7
|
-
export let iconName ='
|
7
|
+
export let iconName ='';
|
8
8
|
export let link = "#";
|
9
|
+
export let type = " ";
|
10
|
+
|
9
11
|
</script>
|
10
12
|
|
11
13
|
<NavItem class='me-3' {...$$restProps}>
|
12
|
-
<NavLink href={link} class='headerIcons' on:click
|
14
|
+
<NavLink href={link} class='headerIcons' on:click>
|
15
|
+
{#if type === "icon"}
|
16
|
+
<Icon name={iconName}></Icon>
|
17
|
+
{:else if type === "avatarText"}
|
18
|
+
<span class="avatar-text">
|
19
|
+
<slot></slot>
|
20
|
+
</span>
|
21
|
+
{/if}
|
22
|
+
</NavLink>
|
13
23
|
</NavItem>
|
14
24
|
|
15
25
|
<style>@import url(https://fonts.googleapis.com/icon?family=Material+Icons);
|
@@ -39,6 +49,9 @@
|
|
39
49
|
width: 45px;
|
40
50
|
font-weight: bold;
|
41
51
|
}
|
52
|
+
.avatar-text {
|
53
|
+
color: black;
|
54
|
+
}
|
42
55
|
:global(.headerIcons i) {
|
43
56
|
padding: 0 4px;
|
44
57
|
font-size: 18px;
|
@@ -4,6 +4,7 @@
|
|
4
4
|
export default class HeaderItem extends SvelteComponentTyped<{
|
5
5
|
[x: string]: any;
|
6
6
|
link?: string | undefined;
|
7
|
+
type?: string | undefined;
|
7
8
|
iconName?: string | undefined;
|
8
9
|
}, {
|
9
10
|
click: MouseEvent;
|
@@ -21,6 +22,7 @@ declare const __propDef: {
|
|
21
22
|
props: {
|
22
23
|
[x: string]: any;
|
23
24
|
link?: string | undefined;
|
25
|
+
type?: string | undefined;
|
24
26
|
iconName?: string | undefined;
|
25
27
|
};
|
26
28
|
events: {
|