Skip to content

Commit 4c2565b

Browse files
committed
Do not render header if not passed in
1 parent 9e2eb99 commit 4c2565b

File tree

2 files changed

+11
-16
lines changed

2 files changed

+11
-16
lines changed

src/split-panel/implementation.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,15 @@ export function SplitPanelImplementation({
103103
const wrappedHeader = (
104104
<div className={clsx(styles.header, isToolbar && styles['with-toolbar'])} style={appLayoutMaxWidth}>
105105
<div className={styles['header-content']}>
106-
<div className={clsx(styles['header-main-row'], showDescription && styles['with-description'])}>
106+
<div className={styles['header-main-row']}>
107107
<div className={styles['header-start']}>
108108
{headerBefore && <span className={styles['header-before-slot']}>{headerBefore}</span>}
109109
<div className={styles['header-text-and-info']}>
110-
<h2 className={clsx(styles['header-text'], testUtilStyles['header-text'])} id={panelHeaderId}>
111-
{header}
112-
</h2>
110+
{header && (
111+
<h2 className={clsx(styles['header-text'], testUtilStyles['header-text'])} id={panelHeaderId}>
112+
{header}
113+
</h2>
114+
)}
113115
{headerInfo && <span className={styles['header-info-slot']}>{headerInfo}</span>}
114116
</div>
115117
</div>

src/split-panel/styles.scss

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -240,13 +240,6 @@ $app-layout-drawer-width: calc(#{awsui.$space-layout-toggle-diameter} + 2 * #{aw
240240
&-main-row,
241241
&-text-and-info {
242242
display: flex;
243-
flex-grow: 1;
244-
}
245-
246-
&-content,
247-
&-start,
248-
&-text-and-info {
249-
flex-grow: 1;
250243
}
251244

252245
&-main-row,
@@ -256,11 +249,6 @@ $app-layout-drawer-width: calc(#{awsui.$space-layout-toggle-diameter} + 2 * #{aw
256249
column-gap: awsui.$space-scaled-xs;
257250
row-gap: awsui.$space-scaled-xxs;
258251
}
259-
260-
&-content {
261-
align-items: flex-start;
262-
}
263-
264252
&-main-row {
265253
flex: auto;
266254
flex-direction: row;
@@ -270,6 +258,11 @@ $app-layout-drawer-width: calc(#{awsui.$space-layout-toggle-diameter} + 2 * #{aw
270258

271259
&-start {
272260
align-items: center;
261+
flex-grow: 1;
262+
}
263+
264+
&-content {
265+
align-items: flex-start;
273266
}
274267

275268
&-text-and-info {

0 commit comments

Comments
 (0)