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>
|
<script>
|
||||||
|
/**
|
||||||
|
* Specify href value
|
||||||
|
* @type {string} [href]
|
||||||
|
*/
|
||||||
|
export let href;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set to `true` to use the inline variant
|
* Set to `true` to use the inline variant
|
||||||
* @type {boolean} [inline=false]
|
* @type {boolean} [inline=false]
|
||||||
|
@ -48,6 +54,7 @@
|
||||||
class:bx--link--inline="{inline}"
|
class:bx--link--inline="{inline}"
|
||||||
class:bx--link--visited="{visited}"
|
class:bx--link--visited="{visited}"
|
||||||
rel="{$$restProps.target === '_blank' ? 'noopener noreferrer' : undefined}"
|
rel="{$$restProps.target === '_blank' ? 'noopener noreferrer' : undefined}"
|
||||||
|
{href}
|
||||||
{...$$restProps}
|
{...$$restProps}
|
||||||
on:click
|
on:click
|
||||||
on:mouseover
|
on:mouseover
|
||||||
|
|
5
types/index.d.ts
vendored
5
types/index.d.ts
vendored
|
@ -1884,6 +1884,11 @@ export class InlineNotification extends CarbonSvelteComponent {
|
||||||
|
|
||||||
export class Link extends CarbonSvelteComponent {
|
export class Link extends CarbonSvelteComponent {
|
||||||
$$prop_def: {
|
$$prop_def: {
|
||||||
|
/**
|
||||||
|
* Specify href value
|
||||||
|
*/
|
||||||
|
href: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set to `true` to use the inline variant
|
* Set to `true` to use the inline variant
|
||||||
* @default false
|
* @default false
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue