@orangecheck/design 0.30.0 → 0.30.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.
@@ -20,7 +20,7 @@ interface OcErrorPageProps {
20
20
  code?: number | string;
21
21
  title?: string;
22
22
  detail?: string;
23
- actions?: string[];
23
+ actions?: ReactNode[];
24
24
  homeHref?: string;
25
25
  children?: ReactNode;
26
26
  className?: string;
@@ -20,7 +20,7 @@ interface OcErrorPageProps {
20
20
  code?: number | string;
21
21
  title?: string;
22
22
  detail?: string;
23
- actions?: string[];
23
+ actions?: ReactNode[];
24
24
  homeHref?: string;
25
25
  children?: ReactNode;
26
26
  className?: string;
@@ -229,14 +229,22 @@ function OcErrorPage({
229
229
  ] }),
230
230
  shownActions.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-8 border", children: [
231
231
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-b px-4 py-2 font-mono text-[11px] tracking-widest uppercase", children: "what can you do" }),
232
- /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "divide-y font-mono text-xs", children: shownActions.map((a) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "px-4 py-2", children: [
233
- ">> ",
234
- a
235
- ] }, a)) })
232
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "divide-y font-mono text-xs", children: shownActions.map((a, i) => (
233
+ // Index keys: items are nodes and the list is
234
+ // static per variant, so there is nothing
235
+ // better to key on and nothing reorders.
236
+ /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "px-4 py-2", children: [
237
+ ">> ",
238
+ a
239
+ ] }, i)
240
+ )) })
236
241
  ] }),
237
242
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-8 flex flex-wrap gap-3", children: [
238
- /* @__PURE__ */ jsxRuntime.jsx(Button, { asChild: true, className: "font-mono", children: /* @__PURE__ */ jsxRuntime.jsx(Link__default.default, { href: homeHref, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] tracking-widest uppercase", children: "go home" }) }) }),
239
- /* @__PURE__ */ jsxRuntime.jsx(
243
+ /* @__PURE__ */ jsxRuntime.jsx(Button, { asChild: true, className: "font-mono", children: /* @__PURE__ */ jsxRuntime.jsxs(Link__default.default, { href: homeHref, children: [
244
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Home, { className: "mr-2 h-3 w-3" }),
245
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] tracking-widest uppercase", children: "go home" })
246
+ ] }) }),
247
+ /* @__PURE__ */ jsxRuntime.jsxs(
240
248
  Button,
241
249
  {
242
250
  variant: "outline",
@@ -246,7 +254,10 @@ function OcErrorPage({
246
254
  else window.history.back();
247
255
  },
248
256
  className: "font-mono",
249
- children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] tracking-widest uppercase", children: isServerError ? "retry" : "go back" })
257
+ children: [
258
+ isServerError ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCw, { className: "mr-2 h-3 w-3" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowLeft, { className: "mr-2 h-3 w-3" }),
259
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] tracking-widest uppercase", children: isServerError ? "retry" : "go back" })
260
+ ]
250
261
  }
251
262
  )
252
263
  ] }),