Skip to content

Commit 4b3e851

Browse files
committed
feat: adapt search part to new theme in Scenario Manager
1 parent 0897e28 commit 4b3e851

File tree

2 files changed

+12
-23
lines changed

2 files changed

+12
-23
lines changed

src/charts/ScenarioManagerTreeList/ScenarioManagerTreeList.js

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import React, { useEffect, useMemo, useState } from 'react';
55
import PropTypes from 'prop-types';
66
import clsx from 'clsx';
7-
import { Button, Paper, TextField, Tooltip } from '@material-ui/core';
7+
import { IconButton, Paper, TextField, Tooltip } from '@material-ui/core';
88
import {
99
UnfoldMore as UnfoldMoreIcon,
1010
UnfoldLess as UnfoldLessIcon,
@@ -182,34 +182,23 @@ export const ScenarioManagerTreeList = (props) => {
182182
className={classes.searchField}
183183
value={searchText}
184184
onChange={onSearchTextChange}
185+
color="primary"
185186
/>
186187
<div className={classes.toolbar}>
187188
<Tooltip title={labels?.toolbar?.collapseAll || 'Collapse all'}>
188-
<Button
189-
variant="contained"
190-
color="primary"
191-
className={classes.toolbarPrimaryAction}
192-
startIcon={<UnfoldLessIcon />}
193-
onClick={collapseAll}
194-
/>
189+
<IconButton className={classes.toolbarPrimaryAction} onClick={collapseAll}>
190+
<UnfoldLessIcon color="primary" />
191+
</IconButton>
195192
</Tooltip>
196193
<Tooltip title={labels?.toolbar?.expandAll || 'Expand all'}>
197-
<Button
198-
variant="contained"
199-
color="primary"
200-
className={classes.toolbarPrimaryAction}
201-
startIcon={<UnfoldMoreIcon />}
202-
onClick={expandAll}
203-
/>
194+
<IconButton className={classes.toolbarPrimaryAction} onClick={expandAll}>
195+
<UnfoldMoreIcon color="primary" />
196+
</IconButton>
204197
</Tooltip>
205198
<Tooltip title={labels?.toolbar?.expandTree || 'Expand tree'}>
206-
<Button
207-
variant="contained"
208-
color="primary"
209-
className={classes.toolbarPrimaryAction}
210-
startIcon={<AccountTreeIcon />}
211-
onClick={expandTree}
212-
/>
199+
<IconButton className={classes.toolbarPrimaryAction} onClick={expandTree}>
200+
<AccountTreeIcon color="primary" />
201+
</IconButton>
213202
</Tooltip>
214203
</div>
215204
</div>

src/charts/ScenarioManagerTreeList/style.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const useStyles = makeStyles((theme) => ({
4646
display: 'flex',
4747
flexDirection: 'row',
4848
alignItems: 'flex-start',
49-
justifyContent: 'flex-start',
49+
justifyContent: 'center',
5050
},
5151
treesContainer: {
5252
height: `calc(100% - ${TREES_CONTAINER_OFFSET}px)`, // Offset by header height + search bar height

0 commit comments

Comments
 (0)