Skip to content

Commit

Permalink
feat(vtmn/svelte): change vtmnChip in order to set a different ty…
Browse files Browse the repository at this point in the history
…pe of node (#1479)
  • Loading branch information
Tlahey committed Jan 25, 2024
1 parent 507c45d commit 7516a55
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
*/
export let badgeValue = 0;
/**
* Root node type
*/
export let element = 'div';
let className = undefined;
/**
* @type {string} Custom classes to apply to the component.
Expand Down Expand Up @@ -79,7 +84,8 @@
};
</script>

<div
<svelte:element
this={element}
class={componentClass}
role="button"
aria-disabled={disabled}
Expand All @@ -89,6 +95,7 @@
on:keyup
on:keypress
tabindex={disabled ? undefined : 0}
{...$$restProps}
>
{#if displayLeftIcon}
<VtmnIcon value={icon} aria-hidden="true" />
Expand All @@ -107,7 +114,7 @@
{#if displayFilterBadge}
<VtmnBadge value={badgeValue} />
{/if}
</div>
</svelte:element>

<style lang="css">
@import '@vtmn/css-chip';
Expand Down

0 comments on commit 7516a55

Please sign in to comment.