@nekm/svelte-core 1.4.2 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/external-link.svelte +15 -0
- package/dist/external-link.svelte.d.ts +9 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type {Snippet} from "svelte";
|
|
3
|
+
|
|
4
|
+
export interface ExternalLinkProps {
|
|
5
|
+
readonly href: string;
|
|
6
|
+
readonly children: Snippet;
|
|
7
|
+
readonly type?: "nofollow" | "ugc" | "sponsored";
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { href, children, type = "nofollow" }: ExternalLinkProps = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<a {href} target="_blank" rel="{type} noreferrer noopener">
|
|
14
|
+
{@render children()}
|
|
15
|
+
</a>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
export interface ExternalLinkProps {
|
|
3
|
+
readonly href: string;
|
|
4
|
+
readonly children: Snippet;
|
|
5
|
+
readonly type?: "nofollow" | "ugc" | "sponsored";
|
|
6
|
+
}
|
|
7
|
+
declare const ExternalLink: import("svelte").Component<ExternalLinkProps, {}, "">;
|
|
8
|
+
type ExternalLink = ReturnType<typeof ExternalLink>;
|
|
9
|
+
export default ExternalLink;
|
package/dist/index.d.ts
CHANGED
|
@@ -11,3 +11,5 @@ export { default as CookieConsentPopupsmart } from "./cookie-consent-popupsmart.
|
|
|
11
11
|
export * from "./cookie-consent-popupsmart.svelte";
|
|
12
12
|
export { default as LdJson } from "./ld-json.svelte";
|
|
13
13
|
export * from "./ld-json.svelte";
|
|
14
|
+
export { default as ExternalLink } from "./external-link.svelte";
|
|
15
|
+
export * from "./external-link.svelte";
|
package/dist/index.js
CHANGED
|
@@ -11,3 +11,5 @@ export { default as CookieConsentPopupsmart } from "./cookie-consent-popupsmart.
|
|
|
11
11
|
export * from "./cookie-consent-popupsmart.svelte";
|
|
12
12
|
export { default as LdJson } from "./ld-json.svelte";
|
|
13
13
|
export * from "./ld-json.svelte";
|
|
14
|
+
export { default as ExternalLink } from "./external-link.svelte";
|
|
15
|
+
export * from "./external-link.svelte";
|
package/package.json
CHANGED