add OutboundLink (#504)

* feat(link): add OutboundLink

* fix(outbound-link): forward Link events
This commit is contained in:
Eric Liu 2021-02-03 05:27:24 -08:00 committed by GitHub
commit 251f986304
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 85 additions and 7 deletions

View file

@ -0,0 +1,18 @@
<script>
/** @extends {"./Link"} LinkProps */
import Link from "./Link.svelte";
import Launch16 from "carbon-icons-svelte/lib/Launch16/Launch16.svelte";
</script>
<Link
{...$$restProps}
on:click
on:mouseover
on:mouseenter
on:mouseleave
target="_blank"
>
<slot />
<Launch16 />
</Link>

View file

@ -1 +1,2 @@
export { default as Link } from "./Link.svelte";
export { default as OutboundLink } from "./OutboundLink.svelte";

View file

@ -49,7 +49,7 @@ export { FormLabel } from "./FormLabel";
export { Grid, Row, Column } from "./Grid";
export { Icon, IconSkeleton } from "./Icon";
export { InlineLoading } from "./InlineLoading";
export { Link } from "./Link";
export { Link, OutboundLink } from "./Link";
export {
ListBox,
ListBoxField,