UNPKG

@conduction/components

Version:

React (Gatsby) components used within the Conduction Skeleton Application (and its implementations)

11 lines (10 loc) 985 B
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import * as styles from "./HorizontalImageCard.module.css"; import clsx from "clsx"; import { Link } from "@utrecht/component-library-react"; import { navigate } from "gatsby"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faArrowRight, faExternalLink } from "@fortawesome/free-solid-svg-icons"; export const HorizontalImageCard = ({ title, layoutClassName, external, link, iconOrImage, }) => { return (_jsxs("div", { className: clsx(styles.container, [layoutClassName && layoutClassName]), onClick: () => navigate(link.href), children: [_jsx("div", { className: styles.imageOrIconContainer, children: iconOrImage }), _jsxs("div", { className: styles.linkContainer, children: [_jsx("div", { className: styles.title, children: title }), _jsxs(Link, { className: styles.link, children: [_jsx(FontAwesomeIcon, { icon: external ? faExternalLink : faArrowRight }), link.label] })] })] })); };