import "./link.css"; import type * as React from "react"; import { Button as Base } from "@base-ui/react/button"; import { type TextSize } from "./text"; import { type StyleProps } from "./style_props"; export interface LinkProps extends StyleProps { children: React.ReactNode; /** Opening the link is the consumer's job (a URL via the app SDK's openExternal, * an in-app route, …) — Link is pure presentation + the press target. */ onPress: () => void; size?: TextSize; accessibilityLabel?: string; testID?: string; ref?: React.Ref; render?: Base.Props["render"]; } /** * An EXTERNAL hyperlink — the kit's link ink + `role="link"`, the universal "this * opens somewhere else" signal (a document URL, a record, an invoice), the colour * fixed so it always reads as a destination. The deliberate counterpart to * `TextLink` — the neutral, colour-configurable underlined link that is OPTIONALLY * an `onPress` action (or plain underlined text). Reach for `Link` when the thing * is specifically a destination; the consumer wires `onPress` to its opener. * * **THE RULE IS DRAWN ON REACH, NOT AT REST.** A destination on its own line, * in the ink no other run wears, is already announced — underlining it as well * is the browser's 1993 default, and a record that holds six of them reads as a * page of hyperlinks rather than as facts one of which goes somewhere. The * underline arrives on hover and on keyboard focus, which is where a reader is * asking "is this pressable"; it is never the only signal, because the ink and * the role both carry it. * * The ELEMENT is a button carrying `role="link"`, not an anchor: this component * has no URL to put in an `href`, and an `` without one is neither focusable * nor a link. A caller that HAS the URL wants `TextLink href`, which renders the * real anchor and with it middle-click and open-in-new-tab. */ export declare function Link({ children, onPress, size, accessibilityLabel, testID, render, ref, ...props }: LinkProps): React.JSX.Element;