File tree 2 files changed +8
-4
lines changed
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @domparty/fe" ,
3
- "version" : " 0.0.73 " ,
3
+ "version" : " 0.0.75 " ,
4
4
"description" : " Our white-label front-end component library. Filled with functional components to help you kick-start your project 🚀" ,
5
5
"main" : " components/index.js" ,
6
6
"scripts" : {
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ export interface GridProps {
9
9
fullHeight ?: boolean ;
10
10
style ?: { } ;
11
11
slices ?: any ;
12
+ className ?: string | null ;
12
13
}
13
14
14
15
export default function Grid ( {
@@ -18,6 +19,7 @@ export default function Grid({
18
19
gap = 0 ,
19
20
fullHeight = false ,
20
21
style : innerStyle = { } ,
22
+ className = null ,
21
23
} : GridProps ) {
22
24
if ( typeof children === 'undefined' ) return null ;
23
25
const childs = Array . isArray ( children ) === false ? [ children ] : children ;
@@ -70,15 +72,17 @@ export default function Grid({
70
72
. join ( '' ) }
71
73
` ;
72
74
73
- console . log ( 'externalClassname' , externalClassname ) ;
74
-
75
75
return cloneElement ( c , {
76
76
className : `${ className } ${ externalClassname ? ` ${ externalClassname } ` : '' } ` ,
77
77
} ) ;
78
78
}
79
79
80
+ const wrapperProps = {
81
+ ...( className ? { className, style : wrapperStyle } : { style : wrapperStyle } ) ,
82
+ } ;
83
+
80
84
return (
81
85
// @ts -ignore
82
- < div style = { wrapperStyle } > { childs . map ( renderChild ) } </ div >
86
+ < div { ... wrapperProps } > { childs . map ( renderChild ) } </ div >
83
87
) ;
84
88
}
You can’t perform that action at this time.
0 commit comments