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:
Eric Liu 2021-04-30 17:08:09 -07:00 committed by GitHub
commit f3cddbad9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 131 additions and 62 deletions

View file

@ -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}