@@ -84,7 +84,6 @@ const NotificationPanel = React.forwardRef<HTMLDivElement, NotificationPanelProp
84
84
compactVariant,
85
85
label,
86
86
fluid = false ,
87
- size,
88
87
className,
89
88
labelId,
90
89
role,
@@ -126,15 +125,17 @@ const NotificationPanel = React.forwardRef<HTMLDivElement, NotificationPanelProp
126
125
) ,
127
126
} ;
128
127
const renderContent = ( ) : JSX . Element => {
128
+ const outlineVariant = compactVariant === 'outline' ;
129
129
const contentClasses = classNames ( styles [ 'notification-panel__content' ] ) ;
130
130
const labelClasses = classNames ( styles [ 'notification-panel__label' ] , {
131
131
[ styles [ 'notification-panel__label--no-content' ] ] : ! children && ! expanderChildren ,
132
- [ styles [ 'notification-panel__label__compact ' ] ] : ! ! compactVariant ,
133
- [ styles [ 'notification-panel__label__compact--basic ' ] ] : compactVariant === 'basic' ,
132
+ [ styles [ 'notification-panel__label--compact ' ] ] : ! ! compactVariant ,
133
+ [ styles [ 'notification-panel__label--outline ' ] ] : outlineVariant ,
134
134
} ) ;
135
135
const childrenClasses = classNames ( styles [ 'notification-panel__children' ] , {
136
- [ styles [ 'notification-panel__label-and-content--spacing ' ] ] : label ,
136
+ [ styles [ 'notification-panel__children--with-label ' ] ] : label ,
137
137
[ styles [ 'notification-panel__children--expander-no-label' ] ] : expanderChildren && ! label ,
138
+ [ styles [ 'notification-panel__children--outline' ] ] : outlineVariant ,
138
139
} ) ;
139
140
140
141
return (
@@ -144,7 +145,7 @@ const NotificationPanel = React.forwardRef<HTMLDivElement, NotificationPanelProp
144
145
{ label }
145
146
</ h1 >
146
147
) }
147
- { children && ! compactVariant && < div className = { childrenClasses } > { children } </ div > }
148
+ { children && < div className = { childrenClasses } > { children } </ div > }
148
149
{ expanderChildren && expanderButtonText && expanderButtonClosedText && ! compactVariant && (
149
150
< DetailButton
150
151
expanderOpenFromStart = { expanderOpenFromStart }
@@ -161,11 +162,9 @@ const NotificationPanel = React.forwardRef<HTMLDivElement, NotificationPanelProp
161
162
styles [ 'notification-panel' ] ,
162
163
styles [ `notification-panel--${ variant } ` ] ,
163
164
{
164
- [ styles [ `notification-panel--${ size } ` ] ] : ! ! size ,
165
- [ styles [ 'notification-panel__compact' ] ] : ! ! compactVariant ,
166
- [ styles [ 'notification-panel__compact--basic' ] ] : compactVariant === 'basic' ,
167
- [ styles [ 'notification-panel__compact--outline' ] ] : compactVariant === 'outline' ,
168
- [ styles [ 'notification-panel--has-children' ] ] : ! ! children ,
165
+ [ styles [ 'notification-panel--compact' ] ] : ! ! compactVariant ,
166
+ [ styles [ 'notification-panel--compact--basic' ] ] : compactVariant === 'basic' ,
167
+ [ styles [ 'notification-panel--compact--outline' ] ] : compactVariant === 'outline' ,
169
168
[ styles [ 'notification-panel--with-content' ] ] : expanderChildren || ( label && children ) ,
170
169
[ styles [ 'notification-panel--dismissable' ] ] : dismissable ,
171
170
} ,
0 commit comments