@navikt/ds-react
Version:
React components from the Norwegian Labour and Welfare Administration.
28 lines (27 loc) • 1.39 kB
TypeScript
import React, { AnchorHTMLAttributes, type ComponentProps, HTMLAttributes } from "react";
import { ArrowRightIcon } from "@navikt/aksel-icons";
import type { AsChildProps } from "../../types";
type LinkAnchorOverlayProps = HTMLAttributes<HTMLDivElement> & AsChildProps;
declare const LinkAnchorOverlay: React.ForwardRefExoticComponent<LinkAnchorOverlayProps & React.RefAttributes<HTMLDivElement>>;
type LinkAnchorProps = AnchorHTMLAttributes<HTMLAnchorElement> & ({
children: React.ReactElement | false | null;
/**
* Renders the component and its child as a single element,
* merging the props of the component with the props of the child.
*/
asChild: true;
as?: never;
} | {
children: React.ReactNode;
/**
* Renders the component and its child as a single element,
* merging the props of the component with the props of the child.
*/
asChild?: false;
href: string;
});
declare const LinkAnchor: React.ForwardRefExoticComponent<LinkAnchorProps & React.RefAttributes<HTMLAnchorElement>>;
type LinkAnchorArrowProps = Omit<ComponentProps<typeof ArrowRightIcon>, "ref">;
declare const LinkAnchorArrow: React.ForwardRefExoticComponent<LinkAnchorArrowProps & React.RefAttributes<SVGSVGElement>>;
export { LinkAnchor, LinkAnchorArrow, LinkAnchorOverlay };
export type { LinkAnchorArrowProps, LinkAnchorOverlayProps, LinkAnchorProps };