@nimblegiant/stilts 0.2.0-alpha.4 → 0.2.0-alpha.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nimblegiant/stilts",
3
- "version": "0.2.0-alpha.4",
3
+ "version": "0.2.0-alpha.5",
4
4
  "description": "Nimble Giant's whimsical yet disciplined design system",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -40,7 +40,7 @@ export function ListCard({
40
40
  specialImageComponent = false,
41
41
  imageBgClass = "bg-[var(--color-surface-muted)]",
42
42
  children,
43
- imageDark,
43
+ imageDark,
44
44
  imageLight,
45
45
  footerSlot,
46
46
  }: ListCardProps) {
@@ -68,18 +68,20 @@ export function ListCard({
68
68
  )}
69
69
 
70
70
  {/* Special image component slot */}
71
- <div className="relative flex aspect-video w-full items-center justify-center overflow-hidden rounded-t-lg bg-gradient-to-br from-[var(--color-dot-magenta)] via-[var(--color-dot-purple)] to-[var(--color-dot-turquoise)] p-12">
72
- <img
73
- src={imageDark}
74
- alt={title}
75
- className="dark-mode-hidden h-full w-full object-contain transition-transform duration-300 group-hover:scale-105"
76
- />
77
- <img
78
- src={imageLight}
79
- alt={title}
80
- className="dark-mode-visible h-full w-full object-contain transition-transform duration-300 group-hover:scale-105"
81
- />
82
- </div>
71
+ {(imageDark?.length || 0) > 0 && (imageLight?.length || 0) > 0 ? (
72
+ <div className="relative flex aspect-video w-full items-center justify-center overflow-hidden rounded-t-lg bg-gradient-to-br from-[var(--color-dot-magenta)] via-[var(--color-dot-purple)] to-[var(--color-dot-turquoise)] p-12">
73
+ <img
74
+ src={imageDark}
75
+ alt={title}
76
+ className="dark-mode-hidden h-full w-full object-contain transition-transform duration-300 group-hover:scale-105"
77
+ />
78
+ <img
79
+ src={imageLight}
80
+ alt={title}
81
+ className="dark-mode-visible h-full w-full object-contain transition-transform duration-300 group-hover:scale-105"
82
+ />
83
+ </div>
84
+ ) : undefined}
83
85
 
84
86
  {/* Content */}
85
87
  <div className="flex flex-1 flex-col p-6">