UNPKG

@navikt/ds-react

Version:

React components from the Norwegian Labour and Welfare Administration.

27 lines (26 loc) 1.3 kB
import React, { AnchorHTMLAttributes, HTMLAttributes, SVGProps } from "react"; import { 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<SVGProps<SVGSVGElement>, "ref">; declare const LinkAnchorArrow: React.ForwardRefExoticComponent<LinkAnchorArrowProps & React.RefAttributes<SVGSVGElement>>; export { LinkAnchor, LinkAnchorArrow, LinkAnchorOverlay }; export type { LinkAnchorArrowProps, LinkAnchorOverlayProps, LinkAnchorProps };