@local-civics/hub-ui 0.1.256 → 0.1.257
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 +4 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4759,7 +4759,7 @@ const LearningForm = (props) => {
|
|
|
4759
4759
|
}), /* @__PURE__ */ React.createElement(
|
|
4760
4760
|
FormItem,
|
|
4761
4761
|
{
|
|
4762
|
-
displayName:
|
|
4762
|
+
displayName: "Optional: What is one takeaway from this lesson?",
|
|
4763
4763
|
description: "",
|
|
4764
4764
|
format: "question",
|
|
4765
4765
|
questionType: "text",
|
|
@@ -7329,13 +7329,14 @@ const CommentCard = (props) => {
|
|
|
7329
7329
|
onClick: props.onBadgeClick ? () => props.onBadgeClick(comment.badgeId) : void 0
|
|
7330
7330
|
} : { label: "General", kind: "general", onClick: void 0 };
|
|
7331
7331
|
const needsAttention = comment.requireValidation && !comment.resolvedAt;
|
|
7332
|
-
const
|
|
7332
|
+
const canResubmit = !!comment.needsSubmission;
|
|
7333
|
+
const actionLabel = target.kind === "badge" ? canResubmit ? "Resubmit this badge" : "View this badge" : target.kind === "lesson" ? canResubmit ? "Resubmit this lesson" : "View this lesson" : void 0;
|
|
7333
7334
|
return /* @__PURE__ */ React__namespace.createElement("div", { className: `rounded-2xl border bg-white p-4 ${needsAttention ? "border-gold-400/40" : "border-slate-200"}` }, /* @__PURE__ */ React__namespace.createElement("div", { className: "flex items-start justify-between gap-3" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "min-w-0" }, /* @__PURE__ */ React__namespace.createElement("div", { className: "text-xs font-extrabold text-dark-blue-400" }, target.label), /* @__PURE__ */ React__namespace.createElement("div", { className: "mt-0.5 flex items-center gap-1.5 text-[11px] text-slate-400" }, comment.commenterName && /* @__PURE__ */ React__namespace.createElement("span", null, "Commenter: ", comment.commenterName), comment.commenterName && comment.createdAt && /* @__PURE__ */ React__namespace.createElement("span", null, "\xB7"), comment.createdAt && /* @__PURE__ */ React__namespace.createElement("span", null, formatDate(comment.createdAt)))), comment.requireValidation && (!comment.resolvedAt ? /* @__PURE__ */ React__namespace.createElement("span", { className: "shrink-0 rounded-full bg-gold-400/15 px-2.5 py-1 text-[10px] font-bold text-dark-blue-400" }, "Needs validation") : comment.needsSubmission ? /* @__PURE__ */ React__namespace.createElement("span", { className: "shrink-0 rounded-full bg-sky-blue-400/15 px-2.5 py-1 text-[10px] font-bold text-dark-blue-400" }, "Needs submission") : /* @__PURE__ */ React__namespace.createElement("span", { className: "flex shrink-0 items-center gap-1 rounded-full bg-mint-400/15 px-2.5 py-1 text-[10px] font-bold text-dark-blue-400" }, /* @__PURE__ */ React__namespace.createElement(icons$1.IconCheck, { size: 11, stroke: 3, className: "text-mint-400" }), "Resolved"))), /* @__PURE__ */ React__namespace.createElement("p", { className: "mt-2.5 text-xs text-slate-600" }, comment.commentText), actionLabel && target.onClick && /* @__PURE__ */ React__namespace.createElement(
|
|
7334
7335
|
"button",
|
|
7335
7336
|
{
|
|
7336
7337
|
type: "button",
|
|
7337
7338
|
onClick: target.onClick,
|
|
7338
|
-
className: `mt-3 flex items-center gap-1 rounded-lg px-3 py-1.5 text-[11px] font-extrabold ${
|
|
7339
|
+
className: `mt-3 flex items-center gap-1 rounded-lg px-3 py-1.5 text-[11px] font-extrabold ${canResubmit ? "bg-gold-400/15 text-dark-blue-400 hover:bg-gold-400/25" : "border border-slate-200 text-dark-blue-400 hover:bg-slate-50"}`
|
|
7339
7340
|
},
|
|
7340
7341
|
actionLabel,
|
|
7341
7342
|
/* @__PURE__ */ React__namespace.createElement(icons$1.IconArrowRight, { size: 12, stroke: 2.5 })
|