feat(link): add href prop

This commit is contained in:
albert 2020-10-04 19:55:51 +02:00
commit df2d63d6eb
2 changed files with 12 additions and 0 deletions

View file

@ -1,4 +1,10 @@
<script>
/**
* Specify href value
* @type {string} [href]
*/
export let href;
/**
* Set to `true` to use the inline variant
* @type {boolean} [inline=false]
@ -48,6 +54,7 @@
class:bx--link--inline="{inline}"
class:bx--link--visited="{visited}"
rel="{$$restProps.target === '_blank' ? 'noopener noreferrer' : undefined}"
{href}
{...$$restProps}
on:click
on:mouseover

5
types/index.d.ts vendored
View file

@ -1884,6 +1884,11 @@ export class InlineNotification extends CarbonSvelteComponent {
export class Link extends CarbonSvelteComponent {
$$prop_def: {
/**
* Specify href value
*/
href: string;
/**
* Set to `true` to use the inline variant
* @default false