mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
feat(link): add href prop
This commit is contained in:
parent
bcc7058ddf
commit
df2d63d6eb
2 changed files with 12 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue