@empoweredvote/ev-ui 0.5.0 → 0.5.1
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/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1538,7 +1538,8 @@ function PoliticianCard({
|
|
|
1538
1538
|
},
|
|
1539
1539
|
imageWrapper: {
|
|
1540
1540
|
width: isHorizontal ? "90px" : "100%",
|
|
1541
|
-
height: isHorizontal ?
|
|
1541
|
+
height: isHorizontal ? "100%" : "auto",
|
|
1542
|
+
maxHeight: isHorizontal ? "200px" : void 0,
|
|
1542
1543
|
aspectRatio: isHorizontal ? void 0 : "4/5",
|
|
1543
1544
|
flexShrink: 0,
|
|
1544
1545
|
overflow: "hidden"
|
|
@@ -2286,7 +2287,7 @@ function CompassCardHorizontal({
|
|
|
2286
2287
|
"Calibrate your compass"
|
|
2287
2288
|
));
|
|
2288
2289
|
}
|
|
2289
|
-
function renderUnavailablePlate() {
|
|
2290
|
+
function renderUnavailablePlate(message = "Compass currently unavailable for this role.") {
|
|
2290
2291
|
return /* @__PURE__ */ React10.createElement("div", { style: {
|
|
2291
2292
|
width: "100%",
|
|
2292
2293
|
height: "100%",
|
|
@@ -2305,12 +2306,16 @@ function CompassCardHorizontal({
|
|
|
2305
2306
|
maxWidth: "180px",
|
|
2306
2307
|
margin: 0,
|
|
2307
2308
|
fontFamily: fonts.primary
|
|
2308
|
-
} },
|
|
2309
|
+
} }, message));
|
|
2309
2310
|
}
|
|
2310
2311
|
function renderSlotContent() {
|
|
2311
2312
|
if (view === "portrait") return renderPortrait();
|
|
2312
2313
|
if (variant === "empty") return renderEmptyVariant();
|
|
2313
2314
|
if (variant === "administrative" || variant === "judicial") return renderUnavailablePlate();
|
|
2315
|
+
if (variant === "no-stances") {
|
|
2316
|
+
const name = (politician == null ? void 0 : politician.full_name) || "this official";
|
|
2317
|
+
return renderUnavailablePlate(`No compass stances on file for ${name} yet.`);
|
|
2318
|
+
}
|
|
2314
2319
|
return /* @__PURE__ */ React10.createElement("div", { style: {
|
|
2315
2320
|
width: "100%",
|
|
2316
2321
|
height: "100%",
|