/** * Copyright 2020, SumUp Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { type AnchorHTMLAttributes, type ButtonHTMLAttributes, type ReactNode, type Ref } from 'react'; import type { ClickEvent } from '../../types/events.js'; import { type BodyProps } from '../Body/Body.js'; interface BaseProps extends Omit { children: ReactNode; /** * Function that's called when the button is clicked. */ onClick?: (event: ClickEvent) => void; /** * The ref to the HTML DOM element, it can be a button an anchor or a span, typed as any for now because of complex js manipulation with styled components */ ref?: Ref; /** * Short label to describe that the link leads to an external page or opens in a new tab. */ externalLabel?: string; } type LinkElProps = Omit, 'onClick' | 'color'>; type ButtonElProps = Omit, 'onClick' | 'color'>; export type AnchorProps = BaseProps & LinkElProps & ButtonElProps; /** * The Anchor is used to display a link or button that visually looks like * a hyperlink. Based on the Body component, so it also supports its props. */ export declare const Anchor: import("react").ForwardRefExoticComponent & import("react").RefAttributes>; export {};