UNPKG

bootstrap-based-components

Version:
16 lines (15 loc) 1.04 kB
import React from 'react'; import { Card } from 'react-bootstrap'; import './style.scss'; var Header = Card.Header, Body = Card.Body, Footer = Card.Footer, Title = Card.Title, Img = Card.Img; var StandardCard = function (_a) { var header = _a.header, img = _a.img, title = _a.title, footer = _a.footer, children = _a.children, className = _a.className; return (React.createElement(Card, { className: "standard-card " + (className !== null && className !== void 0 ? className : '') }, header && React.createElement(Header, { className: "standard-card-header", as: "h4" }, header), React.createElement(Body, { className: "standard-card-body" }, img && React.createElement(Img, { className: "standard-card-img", variant: "top", src: img }), title && React.createElement(Title, { className: "standard-card-title" }, title), children, footer && React.createElement(Footer, { className: "standard-card-footer" }, footer)))); }; export default StandardCard;