import React from 'react'; import { type BaseCardProps } from '../common/baseCard'; import { type PromoCardIndicatorProps } from './PromoCardIndicator'; export type ReferenceType = React.Ref | React.Ref; export type RelatedTypes = '' | 'alternate' | 'author' | 'bookmark' | 'external' | 'help' | 'license' | 'next' | 'nofollow' | 'noreferrer' | 'noopener' | 'prev' | 'search' | 'tag'; export interface PromoCardCommonProps { /** Optional prop to specify classNames onto the PromoCard */ className?: string; /** Optional prop to specify the ID of the PromoCard */ id?: string; /** Required prop to specify the descriptive text of the PromoCard */ description: string; /** * Optional prop to specify the heading level of the PromoCard * * @default 'h3' */ headingLevel?: 'h3' | 'h4' | 'h5' | 'h6'; /** Optional prop to specify text for the indicator label of the PromoCard */ indicatorLabel?: string; /** Optional prop to specify the icon for the indicator icon of the PromoCard */ indicatorIcon?: PromoCardIndicatorProps['icon']; /** Optional prop to specify an image alt text */ imageAlt?: string; /** Optional prop to specify an image class */ imageClass?: string; /** Optional prop to specify an image source url */ imageSource?: string; /** Specify whether the PromoCard is disabled, or not */ isDisabled?: boolean; /** Specify an onClick event handler */ onClick?: () => void; /** Specify an onKeyDown event handler */ onKeyDown?: (event: React.KeyboardEvent) => void; /** Optional prop to specify the ID used for testing */ testId?: string; /** Required prop to specify the title text of the PromoCard */ title: string; /** Set to false to use body font style for the title */ useDisplayFont?: boolean; ref?: ReferenceType; } export interface PromoCardLinkProps extends PromoCardCommonProps, Omit { /** * Optional prop to prompts a user to save the linked URL instead of * navigating to it */ download?: string; /** Optionally specify an href for your PromoCard to contain an element */ href?: string; /** Optionally specify the language of the linked URL */ hrefLang?: string; /** Optional property that can be pass a ref for the anchor. */ anchorRef?: React.Ref; /** * Optional prop to specify the ID of the anchor element which can be useful when using a ref. */ anchorId?: string; /** * Relationship between the PromoCard href URL and the current page. See * [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel). */ rel?: RelatedTypes; /** Optional prop to to display where the linked URL will show */ target?: React.HTMLAttributeAnchorTarget; /** Only applies to role="radio" or "checkbox" */ defaultChecked?: never; isChecked?: never; tabIndex?: never; type?: never; ref?: ReferenceType; value?: never; } export interface PromoCardCheckedProps extends PromoCardCommonProps, Omit { /** Specify the initial checked attribute of the PromoCard */ defaultChecked?: boolean; /** Specify whether the PromoCard is checked, or not */ isChecked?: boolean; /** Optional prop to specify the tabIndex of the PromoCard */ tabIndex?: number; /** Optional property to provide component Ref */ ref?: ReferenceType; /** Optional prop to specify the input type of the PromoCard */ type?: 'checkbox' | 'radio'; /** Specify the value attribute of the PromoCard if Checkbox or Radio */ value?: string; /** Only applies to s */ download?: never; href?: never; anchorRef?: never; anchorId?: never; hrefLang?: never; rel?: never; target?: never; } export type PromoCardProps = PromoCardLinkProps | PromoCardCheckedProps; export type PolymorphicPromoCard = (props: PromoCardLinkProps | PromoCardCheckedProps) => React.JSX.Element; declare const _default: React.NamedExoticComponent; export default _default; //# sourceMappingURL=PromoCard.d.ts.map