UNPKG

@eccenca/gui-elements

Version:

GUI elements based on other libraries, usable in React application, written in Typescript.

39 lines (38 loc) 1.61 kB
import React from "react"; import { CardProps as BlueprintCardProps, Elevation as BlueprintCardElevation } from "@blueprintjs/core"; export interface CardProps extends Omit<BlueprintCardProps, "elevation"> { /** * `<Card />` element is included in DOM as simple `div` element. * By default it is a HTML `section`. */ isOnlyLayout?: boolean; /** * Take the full height of container to display the card. */ fullHeight?: boolean; /** * Background color is slightly altered to differ card display from other cards. */ elevated?: boolean; /** * Controls the intensity of the drop shadow beneath the card. * At elevation `0`, no drop shadow is applied. * At elevation `-1`, the card is even borderless. */ elevation?: -1 | BlueprintCardElevation; /** * When card (or its children) get focus the card is scrolled into the viewport. * Property value defined which part of the card is always scrolled in, this may important when the card is larger than the viewport. */ scrollinOnFocus?: "start" | "center" | "end"; /** * Controls how much whitespace is displayed within the card subelements. */ whitespaceAmount?: "none" | "small" | "medium" | "large"; } /** * Element to separate content sections from each other. * Cards can include other cards but should not. */ export declare const Card: ({ children, className, elevation, isOnlyLayout, fullHeight, elevated, scrollinOnFocus, whitespaceAmount, interactive, ...otherProps }: CardProps) => React.JSX.Element; export default Card;