UNPKG

@progress/kendo-react-layout

Version:

React Layout components enable you to create a perceptive and intuitive layout of web projects. KendoReact Layout package

58 lines (57 loc) 1.59 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import * as e from "react"; import r from "prop-types"; import { classNames as T } from "@progress/kendo-react-common"; import { cardType as c, cardOrientation as l } from "./interfaces/Enums.mjs"; const d = e.forwardRef((t, p) => { const { children: m, dir: f, style: u, className: y, type: a = s.type, orientation: o = s.orientation, ...R } = t, n = e.useRef(null), i = e.useRef(null); return e.useImperativeHandle(n, () => ({ element: i.current, props: t })), e.useImperativeHandle(p, () => n.current), /* @__PURE__ */ e.createElement( "div", { dir: f, style: u, ref: i, className: T( "k-card", y, { [`k-card-${a}`]: a !== c.DEFAULT }, o === null ? void 0 : o !== l.HORIZONTAL ? "k-card-vertical" : "k-card-horizontal" ), ...R }, m ); }); d.displayName = "KendoReactCard"; d.propTypes = { children: r.node, className: r.string, dir: r.string, orientation: r.oneOf(["horizontal", "vertical"]), style: r.object, type: r.oneOf(["default", "primary", "info", "success", "warning", "error"]) }; const s = { type: c.DEFAULT, orientation: l.VERTICAL }; export { d as Card };