@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.
105 lines (104 loc) • 3.99 kB
TypeScript
import type { BaseProps } from '../../BaseProps';
import type { BreakpointCustomizable, LinkTileProductAspectRatio, LinkTileProductLikeEventDetail, LinkTileProductTarget } from '../types';
export type PLinkTileProductProps = BaseProps & {
/**
* Sets the width-to-height ratio of the tile media area. Supports responsive breakpoint values.
* @default '3/4'
*/
aspectRatio?: BreakpointCustomizable<LinkTileProductAspectRatio>;
/**
* Sets an optional short description providing additional product details below the price.
*/
description?: string;
/**
* Sets the product name displayed prominently at the top of the tile.
*/
heading: string;
/**
* Sets the URL the tile navigates to when clicked. Alternatively, provide a slotted anchor element.
*/
href?: string;
/**
* Shows a like/bookmark button so users can save the product.
* @default true
*/
likeButton?: boolean;
/**
* Reflects whether the product is currently liked — controls the filled state of the like button.
* @default false
*/
liked?: boolean;
/**
* Emitted when the user clicks the like button, with the new liked state in the event detail.
*/
onLike?: (event: CustomEvent<LinkTileProductLikeEventDetail>) => void;
/**
* Sets the current retail price of the product, displayed with or without a discount.
*/
price: string;
/**
* Sets the original recommended retail price shown with a strikethrough to indicate a discount. Requires `price` to be set.
*/
priceOriginal?: string;
/**
* Sets the `rel` attribute on the link (e.g. `noopener`).
*/
rel?: string;
/**
* Specifies where to open the linked URL (e.g. `_self`, `_blank`).
* @default '_self'
*/
target?: LinkTileProductTarget;
};
export declare const PLinkTileProduct: 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"> & {
/**
* Sets the width-to-height ratio of the tile media area. Supports responsive breakpoint values.
* @default '3/4'
*/
aspectRatio?: BreakpointCustomizable<LinkTileProductAspectRatio>;
/**
* Sets an optional short description providing additional product details below the price.
*/
description?: string;
/**
* Sets the product name displayed prominently at the top of the tile.
*/
heading: string;
/**
* Sets the URL the tile navigates to when clicked. Alternatively, provide a slotted anchor element.
*/
href?: string;
/**
* Shows a like/bookmark button so users can save the product.
* @default true
*/
likeButton?: boolean;
/**
* Reflects whether the product is currently liked — controls the filled state of the like button.
* @default false
*/
liked?: boolean;
/**
* Emitted when the user clicks the like button, with the new liked state in the event detail.
*/
onLike?: (event: CustomEvent<LinkTileProductLikeEventDetail>) => void;
/**
* Sets the current retail price of the product, displayed with or without a discount.
*/
price: string;
/**
* Sets the original recommended retail price shown with a strikethrough to indicate a discount. Requires `price` to be set.
*/
priceOriginal?: string;
/**
* Sets the `rel` attribute on the link (e.g. `noopener`).
*/
rel?: string;
/**
* Specifies where to open the linked URL (e.g. `_self`, `_blank`).
* @default '_self'
*/
target?: LinkTileProductTarget;
} & {
children?: import("react").ReactNode | undefined;
} & import("react").RefAttributes<HTMLElement>>;