@engie-group/fluid-design-system-react
Version:
Fluid Design System React
12 lines (9 loc) • 630 B
JavaScript
import { jsxs, jsx } from 'react/jsx-runtime';
import React__default from 'react';
import { Utils } from '../../utils/util.js';
const NJCardBody = React__default.forwardRef(({ heading, headingElement: Wrapper = 'h4', paragraph, className, children, ...htmlProps }, ref) => {
const classes = Utils.classNames('nj-card__body', className);
return (jsxs("div", { ...htmlProps, ref: ref, className: classes, children: [heading && jsx(Wrapper, { className: "nj-card__title", children: heading }), paragraph && jsx("p", { children: paragraph }), children] }));
});
NJCardBody.displayName = 'NJCardBody';
export { NJCardBody };