chore: fix component using the icon field only when it' defined

Signed-off-by: Florent Benoit <fbenoit@redhat.com>
This commit is contained in:
Florent Benoit 2024-08-20 11:59:17 +02:00 committed by Florent BENOIT
parent ad288ce7f6
commit f4a3321b2f

View file

@ -61,5 +61,7 @@ function executeAction() {
class="h-[32px] w-[45px] cursor-pointer text-white {name === 'Close'
? 'hover:bg-[#be4425]'
: 'hover:bg-[#2d2d2d]'} flex place-items-center justify-center">
<svelte:component this={icon} size={iconSize} />
{#if icon}
<svelte:component this={icon} size={iconSize} />
{/if}
</button>