import { forwardRef } from "react"; import { Flex } from "../flex"; import { StyledLink } from "./link.styled"; import type { WithTestId } from "../../types"; export interface LinkProps extends WithTestId> { children: React.ReactNode; href: string; icon?: React.ReactNode; gap?: React.ComponentProps["gap"]; } export const Link = forwardRef((props, ref) => { const { icon, href, css, gap, children, variant = "primary", ...rest } = props; if (icon) return ( {children} {icon} ); return ( {children} ); }); Link.displayName = "Link";