UNPKG

@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.

47 lines (46 loc) 2.02 kB
import type { BaseProps } from '../../BaseProps'; import type { TagIcon, TagVariant } from '../types'; export type PTagProps = BaseProps & { /** * Reduces the tag's padding and height for use in dense layouts where vertical space is limited. * @default false */ compact?: boolean; /** * Sets the icon displayed inside the tag alongside the label. Use `none` to render the tag without an icon. * @default 'none' */ icon?: TagIcon; /** * Sets a URL to a custom SVG icon, overriding the built-in icon set when a brand-specific icon is needed. */ iconSource?: string; /** * Sets the visual style of the tag, which controls its background and text colors (e.g. `primary`, `secondary`, `notification-info`). * @default 'secondary' */ variant?: TagVariant; }; export declare const PTag: 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"> & { /** * Reduces the tag's padding and height for use in dense layouts where vertical space is limited. * @default false */ compact?: boolean; /** * Sets the icon displayed inside the tag alongside the label. Use `none` to render the tag without an icon. * @default 'none' */ icon?: TagIcon; /** * Sets a URL to a custom SVG icon, overriding the built-in icon set when a brand-specific icon is needed. */ iconSource?: string; /** * Sets the visual style of the tag, which controls its background and text colors (e.g. `primary`, `secondary`, `notification-info`). * @default 'secondary' */ variant?: TagVariant; } & { children?: import("react").ReactNode | undefined; } & import("react").RefAttributes<HTMLElement>>;