UNPKG

@engie-group/fluid-design-system-react

Version:

Fluid Design System React

17 lines (14 loc) 769 B
import { jsxs, jsx } from 'react/jsx-runtime'; import React__default from 'react'; import { Utils } from '../../utils/util.js'; const NJCard = React__default.forwardRef(({ hasBottomBorder = false, isHorizontal = false, className, children, image, ...htmlProps }, ref) => { const cardClasses = Utils.classNames('nj-card', { ['nj-card--border']: hasBottomBorder, ['nj-card--horizontal']: isHorizontal }, className); return (jsxs("div", { ...htmlProps, ref: ref, className: cardClasses, children: [image && (jsx("div", { className: "nj-card__img-wrapper", children: React__default.cloneElement(image, { className: 'nj-card__img' }) })), children] })); }); NJCard.displayName = 'NJCard'; export { NJCard };