mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 02:41:05 +00:00
Align v10.33 (#619)
* chore(deps-dev): upgrade carbon-components to v10.33.0 * fix(clickable-tile): support disabled state for ClickableTile * fix(aspect-ratio): add missing 3x2 ratio * docs: update number of supported chart types * feat(link): support link with icon * refactor(outbound-link): use icon prop * fix(search): wrap search icon with div
This commit is contained in:
parent
081783c719
commit
f3cddbad9f
22 changed files with 131 additions and 62 deletions
|
@ -14,6 +14,13 @@
|
|||
/** Set to `true` to use the inline variant */
|
||||
export let inline = false;
|
||||
|
||||
/**
|
||||
* Specify the icon from `carbon-icons-svelte` to render
|
||||
* `inline` must be `false`
|
||||
* @type {typeof import("carbon-icons-svelte").CarbonIcon}
|
||||
*/
|
||||
export let icon = undefined;
|
||||
|
||||
/** Set to `true` to disable the checkbox */
|
||||
export let disabled = false;
|
||||
|
||||
|
@ -37,7 +44,9 @@
|
|||
on:mouseenter
|
||||
on:mouseleave
|
||||
>
|
||||
<slot />
|
||||
<slot />{#if !inline && icon}<div class:bx--link__icon="{true}">
|
||||
<svelte:component this="{icon}" />
|
||||
</div>{/if}
|
||||
</p>
|
||||
{:else}
|
||||
<a
|
||||
|
@ -54,6 +63,9 @@
|
|||
on:click
|
||||
on:mouseover
|
||||
on:mouseenter
|
||||
on:mouseleave><slot /></a
|
||||
on:mouseleave
|
||||
><slot />{#if !inline && icon}<div class:bx--link__icon="{true}">
|
||||
<svelte:component this="{icon}" />
|
||||
</div>{/if}</a
|
||||
>
|
||||
{/if}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue