mirror of
https://github.com/KevinMidboe/planetposen-frontend.git
synced 2025-10-29 13:10:12 +00:00
Remvoed & simplified or refactored general functionality
This commit is contained in:
@@ -11,8 +11,12 @@
|
||||
|
||||
export let title = 'Info';
|
||||
export let type: BadgeType = BadgeType.INFO;
|
||||
export let icon: string = badgeIcons[type];
|
||||
|
||||
if (title === 'CONFIRMED') {
|
||||
type = BadgeType.SUCCESS;
|
||||
}
|
||||
|
||||
$: icon = badgeIcons[type];
|
||||
$: badgeClass = `badge ${type}`;
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
<script lang="ts">
|
||||
import { count, toggleCart, isOpen } from '../cartStore';
|
||||
import IconCart from '../icons/IconCart.svelte';
|
||||
|
||||
$: openClass = $isOpen ? 'open' : '';
|
||||
</script>
|
||||
|
||||
<div id="cart" class="{$isOpen && 'open'}" on:click="{() => toggleCart()}">
|
||||
<div id="cart" class="{openClass}" on:click="{() => toggleCart()}">
|
||||
{#if $count > 0}
|
||||
<span>{$count}</span>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user