@apolitical/component-library 3.5.20 → 3.5.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.mjs CHANGED
@@ -6560,54 +6560,56 @@ const tc = ({ icon: t, description: e, ctaMessage: n, href: r, showEditButton: s
6560
6560
  };
6561
6561
  const tu = ({
6562
6562
  title: t = !1,
6563
- logos: e = [],
6564
- styling: n = {},
6565
- className: r = ""
6563
+ text: e,
6564
+ logos: n = [],
6565
+ styling: r = {},
6566
+ className: s = ""
6566
6567
  }) => {
6567
- const s = e.length;
6568
- if (s === 0)
6568
+ const i = n.length;
6569
+ if (i === 0)
6569
6570
  return null;
6570
- const i = {
6571
+ const o = {
6571
6572
  element: typeof t == "object" ? t.element : "h2",
6572
6573
  text: typeof t == "string" ? t : typeof t == "object" ? t.text : "",
6573
6574
  className: typeof t == "object" ? t.className : ""
6574
- }, { wrapLogos: o = !1, align: c = "center", display: d = "block" } = n;
6575
+ }, { wrapLogos: c = !1, align: d = "center", display: l = "block" } = r;
6575
6576
  return /* @__PURE__ */ a.jsxs(
6576
6577
  "div",
6577
6578
  {
6578
- className: E("logos", r, `align-${c}`, {
6579
- [d]: d !== "block",
6580
- "wrap-logos": o
6579
+ className: E("logos", s, `align-${d}`, {
6580
+ [l]: l !== "block",
6581
+ "wrap-logos": c
6581
6582
  }),
6582
6583
  children: [
6583
6584
  t && Y.createElement(
6584
- i.element,
6585
- { className: E("title", i.className) },
6586
- i.text
6585
+ o.element,
6586
+ { className: E("title", o.className) },
6587
+ o.text
6587
6588
  ),
6589
+ e && /* @__PURE__ */ a.jsx("p", { children: e }),
6588
6590
  /* @__PURE__ */ a.jsx(
6589
6591
  "ul",
6590
6592
  {
6591
6593
  className: E({
6592
- "two-col": s === 2 || s === 4,
6593
- "three-col": s === 5 || s <= 10 && s % 3 === 0
6594
+ "two-col": i === 2 || i === 4,
6595
+ "three-col": i === 5 || i <= 10 && i % 3 === 0
6594
6596
  }),
6595
- children: e.map(({ logo: l, nameOfBusiness: u, link: m = !1, description: f = !1 }, p) => {
6596
- if (!l || !l.url)
6597
+ children: n.map(({ logo: u, nameOfBusiness: m, link: f = !1, description: p = !1 }, h) => {
6598
+ if (!u || !u.url)
6597
6599
  return null;
6598
- const h = /* @__PURE__ */ a.jsx(
6600
+ const v = /* @__PURE__ */ a.jsx(
6599
6601
  "img",
6600
6602
  {
6601
- src: l.url,
6602
- width: l.width || "auto",
6603
- height: l.height || "auto",
6604
- alt: u
6603
+ src: u.url,
6604
+ width: u.width || "auto",
6605
+ height: u.height || "auto",
6606
+ alt: m
6605
6607
  }
6606
6608
  );
6607
6609
  return /* @__PURE__ */ a.jsxs("li", { children: [
6608
- /* @__PURE__ */ a.jsx("p", { className: "img-wrapper", children: m ? /* @__PURE__ */ a.jsx("a", { href: m, target: "_blank", rel: "nofollow noreferrer noopener", children: h }) : h }),
6609
- f && /* @__PURE__ */ a.jsx("small", { children: f })
6610
- ] }, window.btoa(`${l.url}_${p}`));
6610
+ /* @__PURE__ */ a.jsx("p", { className: "img-wrapper", children: f ? /* @__PURE__ */ a.jsx("a", { href: f, target: "_blank", rel: "nofollow noreferrer noopener", children: v }) : v }),
6611
+ p && /* @__PURE__ */ a.jsx("small", { children: p })
6612
+ ] }, window.btoa(`${u.url}_${h}`));
6611
6613
  })
6612
6614
  }
6613
6615
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apolitical/component-library",
3
- "version": "3.5.20",
3
+ "version": "3.5.21",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
@@ -16,6 +16,8 @@ interface Props {
16
16
  text: string;
17
17
  className?: string;
18
18
  };
19
+ /** Text to show above the logos */
20
+ text?: string;
19
21
  /** The logos to show */
20
22
  logos?: Array<LogosType>;
21
23
  /** Optional styling */
@@ -30,5 +32,5 @@ interface Props {
30
32
  /** Additional classes */
31
33
  className?: string;
32
34
  }
33
- declare const LogoSection: ({ title: titleProps, logos, styling, className, }: Props) => import("react/jsx-runtime").JSX.Element | null;
35
+ declare const LogoSection: ({ title: titleProps, text, logos, styling, className, }: Props) => import("react/jsx-runtime").JSX.Element | null;
34
36
  export default LogoSection;