vaderjs-daisyui 0.0.2 → 0.0.3
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.
|
@@ -8,10 +8,11 @@ export type CardProps = {
|
|
|
8
8
|
figure?: VNode;
|
|
9
9
|
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
10
10
|
style?: "border" | "dash";
|
|
11
|
-
side?: boolean;
|
|
12
|
-
imageFull?: boolean;
|
|
13
|
-
center?: boolean;
|
|
11
|
+
side?: boolean;
|
|
12
|
+
imageFull?: boolean;
|
|
13
|
+
center?: boolean;
|
|
14
14
|
className?: string;
|
|
15
|
+
children?: VNode | VNode[]; // ✅ ADD THIS
|
|
15
16
|
};
|
|
16
17
|
|
|
17
18
|
export const Card = component((props: CardProps) => {
|
|
@@ -26,6 +27,7 @@ export const Card = component((props: CardProps) => {
|
|
|
26
27
|
imageFull,
|
|
27
28
|
center,
|
|
28
29
|
className,
|
|
30
|
+
children
|
|
29
31
|
} = props;
|
|
30
32
|
|
|
31
33
|
const classes = ["card"];
|
|
@@ -48,6 +50,7 @@ export const Card = component((props: CardProps) => {
|
|
|
48
50
|
{ className: bodyClasses.join(" ") },
|
|
49
51
|
title ? (typeof title === "string" ? createElement("h2", { className: "card-title" }, title) : title) : null,
|
|
50
52
|
body ? (typeof body === "string" ? createElement("p", {}, body) : body) : null,
|
|
53
|
+
children ? (Array.isArray(children) ? children : [children]) : null, // ✅
|
|
51
54
|
actions ? (Array.isArray(actions) ? actions.map(a => a) : actions) : null
|
|
52
55
|
)
|
|
53
56
|
);
|
package/package.json
CHANGED