@levino/shipyard-base 0.5.10 → 0.5.11

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.
@@ -33,8 +33,12 @@ const isActiveOrHasActiveChild = (entryValue: Entry[string]): boolean => {
33
33
  return (
34
34
  <li class={entryValue.className}>
35
35
  {entryValue.href
36
- ? <a href={entryValue.href} class={cn({ 'bg-base-200/50 font-medium text-primary': isActive })}>{label}</a>
37
- : <span class='menu-title'>{label}</span>}
36
+ ? entryValue.labelHtml
37
+ ? <Fragment set:html={entryValue.labelHtml} />
38
+ : <a href={entryValue.href} class={cn({ 'bg-base-200/50 font-medium text-primary': isActive })}>{label}</a>
39
+ : entryValue.labelHtml
40
+ ? <Fragment set:html={entryValue.labelHtml} />
41
+ : <span class='menu-title'>{label}</span>}
38
42
  {entryValue.subEntry ? (
39
43
  <ul>
40
44
  <Astro.self entry={entryValue.subEntry} currentPath={currentPath} />
@@ -2,6 +2,12 @@ export type Entry = Record<
2
2
  string,
3
3
  {
4
4
  label?: string
5
+ /**
6
+ * Pre-rendered HTML content to use instead of the label string.
7
+ * When provided, this will be rendered using set:html instead of the plain label.
8
+ * Useful for custom label components like buttons, icons, or interactive elements.
9
+ */
10
+ labelHtml?: string
5
11
  href?: string
6
12
  subEntry?: Entry
7
13
  active?: boolean
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@levino/shipyard-base",
3
- "version": "0.5.10",
3
+ "version": "0.5.11",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "scripts": {
package/src/globals.css CHANGED
@@ -3,3 +3,9 @@
3
3
  @tailwind base;
4
4
  @tailwind components;
5
5
  @tailwind utilities;
6
+
7
+ @layer components {
8
+ .prose :where(table) {
9
+ @apply block overflow-x-auto;
10
+ }
11
+ }