@@ -115,49 +115,54 @@ export function SplitPanelImplementation({
115
115
</ div >
116
116
{ headerActions && < div className = { styles [ 'header-actions-slot' ] } > { headerActions } </ div > }
117
117
</ div >
118
- { showDescription && < p className = { styles [ 'header-description' ] } > { headerDescription } </ p > }
119
- </ div >
120
- < div className = { styles [ 'header-actions' ] } >
121
- { ! hidePreferencesButton && isOpen && (
122
- < >
118
+ < div className = { styles [ 'header-actions' ] } >
119
+ { ! hidePreferencesButton && isOpen && (
120
+ < >
121
+ < InternalButton
122
+ className = { testUtilStyles [ 'preferences-button' ] }
123
+ iconName = "settings"
124
+ variant = "icon"
125
+ onClick = { ( ) => setPreferencesOpen ( true ) }
126
+ formAction = "none"
127
+ ariaLabel = { i18nStrings . preferencesTitle }
128
+ ref = { refs . preferences }
129
+ />
130
+ < span className = { styles . divider } />
131
+ </ >
132
+ ) }
133
+
134
+ { isOpen ? (
123
135
< InternalButton
124
- className = { testUtilStyles [ 'preferences-button' ] }
125
- iconName = "settings"
136
+ className = { testUtilStyles [ 'close-button' ] }
137
+ iconName = {
138
+ isRefresh && closeBehavior === 'collapse'
139
+ ? position === 'side'
140
+ ? 'angle-right'
141
+ : 'angle-down'
142
+ : 'close'
143
+ }
126
144
variant = "icon"
127
- onClick = { ( ) => setPreferencesOpen ( true ) }
145
+ onClick = { onToggle }
128
146
formAction = "none"
129
- ariaLabel = { i18nStrings . preferencesTitle }
130
- ref = { refs . preferences }
147
+ ariaLabel = { i18nStrings . closeButtonAriaLabel }
148
+ ariaExpanded = { isOpen }
131
149
/>
132
- < span className = { styles . divider } />
133
- </ >
134
- ) }
135
-
136
- { isOpen ? (
137
- < InternalButton
138
- className = { testUtilStyles [ 'close-button' ] }
139
- iconName = {
140
- isRefresh && closeBehavior === 'collapse' ? ( position === 'side' ? 'angle-right' : 'angle-down' ) : 'close'
141
- }
142
- variant = "icon"
143
- onClick = { onToggle }
144
- formAction = "none"
145
- ariaLabel = { i18nStrings . closeButtonAriaLabel }
146
- ariaExpanded = { isOpen }
147
- />
148
- ) : position === 'side' || closeBehavior === 'hide' ? null : (
149
- < InternalButton
150
- className = { testUtilStyles [ 'open-button' ] }
151
- iconName = "angle-up"
152
- variant = "icon"
153
- formAction = "none"
154
- ariaLabel = { i18nStrings . openButtonAriaLabel }
155
- ref = { refs . toggle }
156
- ariaExpanded = { isOpen }
157
- onClick = { hasCustomElements ? onToggle : undefined }
158
- />
159
- ) }
150
+ ) : position === 'side' || closeBehavior === 'hide' ? null : (
151
+ < InternalButton
152
+ className = { testUtilStyles [ 'open-button' ] }
153
+ iconName = "angle-up"
154
+ variant = "icon"
155
+ formAction = "none"
156
+ ariaLabel = { i18nStrings . openButtonAriaLabel }
157
+ ref = { refs . toggle }
158
+ ariaExpanded = { isOpen }
159
+ onClick = { hasCustomElements ? onToggle : undefined }
160
+ />
161
+ ) }
162
+ </ div >
160
163
</ div >
164
+
165
+ { showDescription && < p className = { styles [ 'header-description' ] } > { headerDescription } </ p > }
161
166
</ div >
162
167
) ;
163
168
0 commit comments