UNPKG

design-react-kit

Version:

Componenti React per Bootstrap 5

25 lines 1.09 kB
import React from 'react'; import classNames from 'classnames'; export const Card = ({ tag = 'article', teaser, image, border = true, borderTop, inline, inlineReverse, inlineMini, rounded, fullHeight, banner, profile, shadow = null, testId, ...attributes }) => { const cardClasses = classNames('it-card', attributes.className, { 'card-teaser': teaser, 'it-card-image': image, 'border': border, 'it-card-inline': inline, 'it-card-inline-reverse': inlineReverse, 'it-card-inline-mini': inlineMini, 'it-card-height-full': fullHeight, 'rounded': rounded, 'card-teaser-wrapper': teaser, 'shadow': shadow === 'normal', 'shadow-lg': shadow === 'lg', 'shadow-sm': shadow === 'sm', 'it-card-banner': banner, 'it-card-profile': profile, 'it-border-top': borderTop, 'it-border-top-secondary': borderTop, }); const T = tag; return (React.createElement(T, { ...attributes, className: cardClasses, "data-testid": testId })); }; //# sourceMappingURL=Card.js.map