@carbon/ibm-products
Version:
Carbon for IBM Products
47 lines (45 loc) • 1.6 kB
JavaScript
/**
* Copyright IBM Corp. 2020, 2026
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import { __toESM } from "../../../_virtual/_rolldown/runtime.js";
import { require_classnames } from "../../../node_modules/classnames/index.js";
import { pkg } from "../../../settings.js";
import { getDevtoolsProps } from "../../../global/js/utils/devtools.js";
import React, { forwardRef } from "react";
import PropTypes from "prop-types";
//#region src/components/Card/next/CardHeaderMedia.tsx
/**
* Copyright IBM Corp. 2026
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
var import_classnames = /* @__PURE__ */ __toESM(require_classnames());
const blockClass = `${pkg.prefix}--card-next`;
const componentName = "CardHeaderMedia";
let CardHeaderMedia = forwardRef(({ children, className, ...rest }, ref) => {
const classes = (0, import_classnames.default)(`${blockClass}__header-media`, className);
return /* @__PURE__ */ React.createElement("div", {
...rest,
ref,
className: classes,
...getDevtoolsProps(componentName)
}, children);
});
CardHeaderMedia.propTypes = {
/**
* Provide the contents of the CardHeaderMedia.
*/
children: PropTypes.node,
/**
* Provide an optional class to be applied to the containing node.
*/
className: PropTypes.string
};
CardHeaderMedia = pkg.checkComponentEnabled(CardHeaderMedia, componentName);
CardHeaderMedia.displayName = componentName;
//#endregion
export { CardHeaderMedia };