@@ -8,6 +8,8 @@ export interface AppDetailViewProps extends Omit<React.HTMLAttributes<HTMLDivEle
8
8
label : string ;
9
9
content : React . ReactNode ;
10
10
isEmpty ?: boolean ;
11
+ center ?: boolean ;
12
+ noWrapper ?: boolean ;
11
13
} [ ] ;
12
14
aCol ?: number | true | Record < 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl' , number | true > ;
13
15
aGutter ?: number | [ number ?, number ?] ;
@@ -77,12 +79,19 @@ export function AppDetailView(props: AppDetailViewProps): JSX.Element | null {
77
79
[ `gy-${ gutterY } ` ] : gutterY ,
78
80
} ) }
79
81
>
80
- { aList . map ( ( { label, content, isEmpty : _isEmpty } ) => {
82
+ { aList . map ( ( { label, content : _content , isEmpty : _isEmpty , center , noWrapper } ) => {
81
83
const isEmpty = isUndefined ( _isEmpty )
82
- ? ( isString ( content ) && content . length === 0 ) || isUndefined ( content ) || isNull ( content )
84
+ ? ( isString ( _content ) && _content . length === 0 ) || isUndefined ( _content ) || isNull ( _content )
83
85
: _isEmpty ;
86
+ const content = isEmpty ? aEmpty : _content ;
87
+
84
88
return (
85
- < div key = { label } className = { getClassName ( 'app-detail-view__item' , col ) } >
89
+ < div
90
+ key = { label }
91
+ className = { getClassName ( 'app-detail-view__item' , col , {
92
+ 'app-detail-view__item--center' : center ,
93
+ } ) }
94
+ >
86
95
< div
87
96
className = "app-detail-view__item-label"
88
97
style = { {
@@ -92,7 +101,7 @@ export function AppDetailView(props: AppDetailViewProps): JSX.Element | null {
92
101
>
93
102
{ label }
94
103
</ div >
95
- < div className = "app-detail-view__item-content" > { isEmpty ? aEmpty : content } </ div >
104
+ { noWrapper ? content : < div className = "app-detail-view__item-content" > { content } </ div > }
96
105
</ div >
97
106
) ;
98
107
} ) }
0 commit comments