UNPKG

1.4 kBTypeScriptView Raw
1import * as React from "react";
2import { Elevation } from "../../common";
3import { type HTMLDivProps, type Props } from "../../common/props";
4export interface CardProps extends Props, HTMLDivProps, React.RefAttributes<HTMLDivElement> {
5 /**
6 * Controls the intensity of the drop shadow beneath the card: the higher
7 * the elevation, the higher the drop shadow. At elevation `0`, no drop
8 * shadow is applied.
9 *
10 * @default 0
11 */
12 elevation?: Elevation;
13 /**
14 * Whether the card should respond to user interactions. If set to `true`,
15 * hovering over the card will increase the card's elevation
16 * and change the mouse cursor to a pointer.
17 *
18 * Recommended when `onClick` is also defined.
19 *
20 * @default false
21 */
22 interactive?: boolean;
23 /**
24 * Whether this card should appear selected.
25 *
26 * @default undefined
27 */
28 selected?: boolean;
29 /**
30 * Whether this component should use compact styles with reduced visual padding.
31 *
32 * @default false
33 */
34 compact?: boolean;
35 /**
36 * Callback invoked when the card is clicked.
37 * Recommended when `interactive` is `true`.
38 */
39 onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
40}
41/**
42 * Card component.
43 *
44 * @see https://blueprintjs.com/docs/#core/components/card
45 */
46export declare const Card: React.FC<CardProps>;