import classNames from "classnames" ; import * as React from "react" ; import { polyfill } from "react-lifecycles-compat" ; import { AbstractPureComponent2 , Classes , Elevation } from "../../common" ; import { DISPLAYNAME_PREFIX , HTMLDivProps , Props } from "../../common/props" ; export type CardProps = ICardProps ; deprecated export interface ICardProps extends Props , HTMLDivProps { default elevation ? : Elevation ; default interactive ? : boolean ; /**
     * Callback invoked when the card is clicked.
     * Recommended when `interactive` is `true`.
     */ onClick ? : ( e : React . MouseEvent < HTMLDivElement > ) => void ; } @ polyfill export class Card extends AbstractPureComponent2 < CardProps > { public static displayName = `${ DISPLAYNAME_PREFIX }.Card` ; public static defaultProps : CardProps = { elevation : Elevation . ZERO , interactive : false , } ; public render ( ) { const { className , elevation , interactive , ... htmlProps } = this . props ; const classes = classNames ( Classes . CARD , { [ Classes . INTERACTIVE ] : interactive } , Classes . elevationClass ( elevation ! ) , className ) ; return < div className = { classes } { ... htmlProps } />; } }