UNPKG

@heroui/card

Version:

Card is a container for text, photos, and actions in the context of a single subject.

35 lines (32 loc) 843 B
"use client"; import { CardProvider } from "./chunk-XHGGCEVJ.mjs"; import { useCard } from "./chunk-DHMIPUUY.mjs"; // src/card.tsx import { forwardRef } from "@heroui/system"; import { Ripple } from "@heroui/ripple"; import { jsx, jsxs } from "react/jsx-runtime"; var Card = forwardRef((props, ref) => { const { children, context, Component, isPressable, disableAnimation, disableRipple, getCardProps, getRippleProps } = useCard({ ...props, ref }); return /* @__PURE__ */ jsxs(Component, { ...getCardProps(), children: [ /* @__PURE__ */ jsx(CardProvider, { value: context, children }), isPressable && !disableAnimation && !disableRipple && /* @__PURE__ */ jsx(Ripple, { ...getRippleProps() }) ] }); }); Card.displayName = "HeroUI.Card"; var card_default = Card; export { card_default };