UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

118 lines (117 loc) 3.39 kB
import { jsx as e, jsxs as a } from "react/jsx-runtime"; import { spreadSx as h } from "../../theme/spreadSx.js"; import { isExternalLink as f } from "../../utils/functions/IsExternalLink.js"; import { Box as m, Stack as d, Typography as s, Button as g, Link as w } from "@mui/material"; import { Link as S } from "react-router"; const z = ({ title: x, buttonText: r, summaryText: i, link: o, sx: l, centered: n = !1, reverseButtonAndText: c = !1 }) => { const p = f(o ?? ""); return /* @__PURE__ */ e( m, { sx: h(l, { ...n && { width: "100%" } }), children: /* @__PURE__ */ a( d, { sx: { gap: "16px", ...n && { textAlign: "center", alignItems: "center" } }, children: [ /* @__PURE__ */ e( s, { variant: "headline2", sx: (t) => ({ paddingTop: "30px", color: "grey.1000", fontSize: { xs: "24px", md: "32px" }, borderTop: "4px solid", borderColor: "grey.400", [t.breakpoints.down("md")]: { width: "100%" } }), children: x } ), (r || i) && /* @__PURE__ */ a( d, { sx: { gap: "16px", width: "100%", ...n && { alignItems: "center", width: "100%" }, ...c && { flexDirection: "column-reverse" } }, children: [ r && /* @__PURE__ */ e( g, { variant: "contained", component: p ? w : S, ...p ? { href: o, target: "_blank", rel: "noopener noreferrer" } : { to: o }, sx: (t) => ({ [t.breakpoints.down("sm")]: { width: "100%" }, maxWidth: "100%", width: "fit-content", whiteSpace: "nowrap", padding: { xs: "6px", sm: "6px 24px" }, fontWeight: "600", fontSize: { xs: "16px", sm: "18px" }, lineHeight: "144%" }), children: r } ), i && /* @__PURE__ */ e( s, { variant: "body1", sx: { fontStyle: "italic", color: "grey.800", fontSize: "18px", lineHeight: "27px" }, children: i } ) ] } ) ] } ) } ); }; export { z as default }; //# sourceMappingURL=PortalSectionHeader.js.map