Skip to content

Commit 1e66ac4

Browse files
committed
fix: Terminal component still has toolbar UI even when searchable===false
This takes up a few pixels of vertical space. In dark themes, it is also visible, despite having no functionality.
1 parent 7f30213 commit 1e66ac4

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

Diff for: plugins/plugin-codeflare/src/components/Terminal.tsx

+11-7
Original file line numberDiff line numberDiff line change
@@ -343,14 +343,18 @@ export default class XTerm extends React.PureComponent<Props, State> {
343343
}
344344

345345
private toolbar() {
346+
const needsToolbar = this.props.searchable !== false
347+
346348
return (
347-
<Toolbar className="codeflare--toolbar">
348-
<ToolbarContent className="flex-fill">
349-
<ToolbarItem variant="search-filter" className="flex-fill">
350-
{this.props.searchable !== false && this.searchInput()}
351-
</ToolbarItem>
352-
</ToolbarContent>
353-
</Toolbar>
349+
needsToolbar && (
350+
<Toolbar className="codeflare--toolbar">
351+
<ToolbarContent className="flex-fill">
352+
<ToolbarItem variant="search-filter" className="flex-fill">
353+
{this.props.searchable !== false && this.searchInput()}
354+
</ToolbarItem>
355+
</ToolbarContent>
356+
</Toolbar>
357+
)
354358
)
355359
}
356360

0 commit comments

Comments
 (0)