UNPKG

@navinc/base-react-components

Version:
28 lines (27 loc) 1.13 kB
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import styled from 'styled-components'; import Header from './header'; import Copy from './copy'; const AuthorContainer = styled.div ` 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.div ` display: grid; grid-gap: 8px; text-align: center; justify-items: center; `; const AuthorImg = styled.img ` border-radius: 50%; max-width: 100px; `; export default ({ description, img, imgAlt, name, title }) => (_jsxs(AuthorContainer, { children: [_jsxs(AuthorDetails, { children: [_jsx(Header, { children: "ABOUT AUTHOR" }, void 0), _jsx(AuthorImg, { src: img, alt: imgAlt }, void 0), _jsx(Header, Object.assign({ size: "sm" }, { children: name }), void 0), _jsx(Copy, Object.assign({ light: true }, { children: title }), void 0)] }, void 0), _jsx(Copy, { children: description }, void 0)] }, void 0)); //# sourceMappingURL=author-card.js.map