mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 02:41:05 +00:00
parent
f048e9ea4a
commit
4888d09479
2 changed files with 4 additions and 8 deletions
|
@ -4,7 +4,7 @@
|
|||
export let href = undefined;
|
||||
export let disabled = false;
|
||||
export let inline = false;
|
||||
export let props = {};
|
||||
export let style = undefined;
|
||||
|
||||
import { cx } from '../../lib';
|
||||
|
||||
|
@ -17,11 +17,11 @@
|
|||
</script>
|
||||
|
||||
{#if disabled}
|
||||
<p {...props} class={_class}>
|
||||
<p on:click on:mouseover on:mouseenter on:mouseleave {style} class={_class}>
|
||||
<slot />
|
||||
</p>
|
||||
{:else}
|
||||
<a {...props} class={_class} {href}>
|
||||
<a on:click on:mouseover on:mouseenter on:mouseleave {style} class={_class} {href}>
|
||||
<slot />
|
||||
</a>
|
||||
{/if}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue