refactor: update/fix JSDoc props

This commit is contained in:
Eric Liu 2020-11-04 06:04:25 -08:00
commit d38e6d8be6
204 changed files with 992 additions and 2359 deletions

View file

@ -0,0 +1,47 @@
<script>
/**
* Set the `href` to use an anchor link
* @type {string}
*/
export let href = undefined;
/**
* Specify the size of button skeleton
* @type {"default" | "field" | "small"}
*/
export let size = "default";
/** Set to `true` to use the small variant */
export let small = false;
</script>
{#if href}
<a
href="{href}"
rel="{$$restProps.target === '_blank' ? 'noopener noreferrer' : undefined}"
role="button"
class:bx--skeleton="{true}"
class:bx--btn="{true}"
class:bx--btn--field="{size === 'field'}"
class:bx--btn--sm="{size === 'small' || small}"
{...$$restProps}
on:click
on:mouseover
on:mouseenter
on:mouseleave
>
{''}
</a>
{:else}
<div
class:bx--skeleton="{true}"
class:bx--btn="{true}"
class:bx--btn--field="{size === 'field'}"
class:bx--btn--sm="{size === 'small' || small}"
{...$$restProps}
on:click
on:mouseover
on:mouseenter
on:mouseleave
></div>
{/if}