@porsche-design-system/components-react
Version:
Porsche Design System is a component library designed to help developers create the best experience for software or services distributed by Dr. Ing. h.c. F. Porsche AG.
61 lines (60 loc) • 2.6 kB
TypeScript
import type { BaseProps } from '../../BaseProps';
import type { SelectedAriaAttributes, DrilldownLinkAriaAttribute, DrilldownLinkTarget } from '../types';
export type PDrilldownLinkProps = BaseProps & {
/**
* Visually marks the link as the currently active navigation item, e.g. the current page.
* @default false
*/
active?: boolean;
/**
* Sets ARIA attributes on the link for improved accessibility. Only applies when `href` is set.
*/
aria?: SelectedAriaAttributes<DrilldownLinkAriaAttribute>;
/**
* Sets the native `download` attribute to trigger a file download. Only applies when `href` is set.
*/
download?: string;
/**
* When set, the component renders as an anchor navigating to this URL. Otherwise, provide a slotted anchor element.
*/
href?: string;
/**
* Sets the `rel` attribute on the link element (e.g. `noopener`). Only applies when `href` is set.
*/
rel?: string;
/**
* Specifies where to open the linked URL (e.g. `_self`, `_blank`). Only applies when `href` is set.
* @default '_self'
*/
target?: DrilldownLinkTarget;
};
export declare const PDrilldownLink: import("react").ForwardRefExoticComponent<Omit<import("react").DOMAttributes<{}>, "onChange" | "onInput" | "onToggle"> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "inert" | "inputMode" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & {
/**
* Visually marks the link as the currently active navigation item, e.g. the current page.
* @default false
*/
active?: boolean;
/**
* Sets ARIA attributes on the link for improved accessibility. Only applies when `href` is set.
*/
aria?: SelectedAriaAttributes<DrilldownLinkAriaAttribute>;
/**
* Sets the native `download` attribute to trigger a file download. Only applies when `href` is set.
*/
download?: string;
/**
* When set, the component renders as an anchor navigating to this URL. Otherwise, provide a slotted anchor element.
*/
href?: string;
/**
* Sets the `rel` attribute on the link element (e.g. `noopener`). Only applies when `href` is set.
*/
rel?: string;
/**
* Specifies where to open the linked URL (e.g. `_self`, `_blank`). Only applies when `href` is set.
* @default '_self'
*/
target?: DrilldownLinkTarget;
} & {
children?: import("react").ReactNode | undefined;
} & import("react").RefAttributes<HTMLElement>>;