feat(link): support "sm", "lg" size variants

This commit is contained in:
Eric Liu 2020-10-29 13:10:42 -07:00
commit 6dd363c2a9
5 changed files with 54 additions and 24 deletions

View file

@ -1,4 +1,10 @@
<script>
/**
* Specify the size of the link
* @type {"sm" | "lg"} [size]
*/
export let size = undefined;
/**
* Specify the href value
* @type {string} [href]
@ -53,6 +59,8 @@
class:bx--link--disabled="{disabled}"
class:bx--link--inline="{inline}"
class:bx--link--visited="{visited}"
class:bx--link--sm="{size === 'sm'}"
class:bx--link--lg="{size === 'lg'}"
rel="{$$restProps.target === '_blank' ? 'noopener noreferrer' : undefined}"
href="{href}"
{...$$restProps}