@wix/design-system
Version:
@wix/design-system
27 lines • 992 B
TypeScript
import { ComponentPropsWithoutRef } from 'react';
import { ValuesOf } from '../utils/typeUtils';
import { SKIN } from './ClickableCard.constants';
export type ClickableCardProps<T extends 'button' | 'a' = 'button'> = {
/** Accepts any node as a child element. */
children?: React.ReactNode;
/** Applies a data-hook HTML attribute that can be used in the tests. */
dataHook?: string;
/** Specifies the skin of a card.
* @default standard
*/
skin?: ClickableCardSkin;
/** Applies padding to the card.
* @default true
*/
hasPadding?: boolean;
/** Specifies whether user interactions are disabled.
* @default false
*/
disabled?: boolean;
/** Defines whether the card is rendered as an anchor (<a>) or a button (<button>). Defaults to button.
* @default button
*/
as?: T;
} & ComponentPropsWithoutRef<T>;
export type ClickableCardSkin = ValuesOf<typeof SKIN>;
//# sourceMappingURL=ClickableCard.types.d.ts.map