mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
add OutboundLink (#504)
* feat(link): add OutboundLink * fix(outbound-link): forward Link events
This commit is contained in:
parent
3e926de49d
commit
251f986304
8 changed files with 85 additions and 7 deletions
18
src/Link/OutboundLink.svelte
Normal file
18
src/Link/OutboundLink.svelte
Normal 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>
|
|
@ -1 +1,2 @@
|
|||
export { default as Link } from "./Link.svelte";
|
||||
export { default as OutboundLink } from "./OutboundLink.svelte";
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue