summaryrefslogtreecommitdiffstats
path: root/apps/web-shared/src/components/breadcrumb/crumb.svelte
blob: e540a447ed7d415d2ee736a4e561ed2189a80ce7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<script>
    export let name;
    export let withArrow = false;
    export let isLink = false;
</script>
<li class="breadcrumbs__item">
    {#if isLink}
        <a class="color-inherit {isLink ? 'cursor-pointer color-primary-light' : ''}"
           on:click>{name}</a>
    {:else}
        <span class="color-inherit {isLink ? 'cursor-pointer color-primary-light' : ''}"
              on:click>{name}</span>
    {/if}
    {#if withArrow}
        <svg class="icon margin-left-xxxs color-contrast-low"
             aria-hidden="true"
             viewBox="0 0 16 16">
            <polyline fill="none"
                      stroke="currentColor"
                      stroke-width="1"
                      stroke-linecap="round"
                      stroke-linejoin="round"
                      stroke-miterlimit="10"
                      points="6.5,3.5 11,8 6.5,12.5 "></polyline>
        </svg>
    {/if}
</li>