UNPKG

@navinc/base-react-components

Version:
33 lines (32 loc) 1.87 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const jsx_runtime_1 = require("react/jsx-runtime"); const styled_components_1 = __importDefault(require("styled-components")); const header_js_1 = __importDefault(require("./header.js")); const copy_js_1 = __importDefault(require("./copy.js")); const AuthorContainer = styled_components_1.default.div.withConfig({ displayName: "brc-sc-AuthorContainer", componentId: "brc-sc-1q5foxt" }) ` display: grid; grid-gap: 24px; align-items: center; box-shadow: 0 0 12px rgba(0, 0, 0, 0.12); border-radius: 4px; padding: 32px 40px; @media (${({ theme }) => theme.forLargerThanPhone}) { grid-template-columns: 25% 1fr; } `; const AuthorDetails = styled_components_1.default.div.withConfig({ displayName: "brc-sc-AuthorDetails", componentId: "brc-sc-1bdwgf5" }) ` display: grid; grid-gap: 8px; text-align: center; justify-items: center; `; const AuthorImg = styled_components_1.default.img.withConfig({ displayName: "brc-sc-AuthorImg", componentId: "brc-sc-12343b1" }) ` border-radius: 50%; max-width: 100px; `; exports.default = ({ description, img, imgAlt, name, title }) => ((0, jsx_runtime_1.jsxs)(AuthorContainer, { children: [(0, jsx_runtime_1.jsxs)(AuthorDetails, { children: [(0, jsx_runtime_1.jsx)(header_js_1.default, { children: "ABOUT AUTHOR" }), (0, jsx_runtime_1.jsx)(AuthorImg, { src: img, alt: imgAlt }), (0, jsx_runtime_1.jsx)(header_js_1.default, Object.assign({ size: "sm" }, { children: name })), (0, jsx_runtime_1.jsx)(copy_js_1.default, Object.assign({ light: true }, { children: title }))] }), (0, jsx_runtime_1.jsx)(copy_js_1.default, { children: description })] })); //# sourceMappingURL=author-card.js.map