Skip to content

Commit

Permalink
feat: adapt search part to new theme in Scenario Manager
Browse files Browse the repository at this point in the history
  • Loading branch information
COSMO-EMI committed Aug 18, 2022
1 parent 0897e28 commit 4b3e851
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 23 deletions.
33 changes: 11 additions & 22 deletions src/charts/ScenarioManagerTreeList/ScenarioManagerTreeList.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import React, { useEffect, useMemo, useState } from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { Button, Paper, TextField, Tooltip } from '@material-ui/core';
import { IconButton, Paper, TextField, Tooltip } from '@material-ui/core';
import {
UnfoldMore as UnfoldMoreIcon,
UnfoldLess as UnfoldLessIcon,
Expand Down Expand Up @@ -182,34 +182,23 @@ export const ScenarioManagerTreeList = (props) => {
className={classes.searchField}
value={searchText}
onChange={onSearchTextChange}
color="primary"
/>
<div className={classes.toolbar}>
<Tooltip title={labels?.toolbar?.collapseAll || 'Collapse all'}>
<Button
variant="contained"
color="primary"
className={classes.toolbarPrimaryAction}
startIcon={<UnfoldLessIcon />}
onClick={collapseAll}
/>
<IconButton className={classes.toolbarPrimaryAction} onClick={collapseAll}>
<UnfoldLessIcon color="primary" />
</IconButton>
</Tooltip>
<Tooltip title={labels?.toolbar?.expandAll || 'Expand all'}>
<Button
variant="contained"
color="primary"
className={classes.toolbarPrimaryAction}
startIcon={<UnfoldMoreIcon />}
onClick={expandAll}
/>
<IconButton className={classes.toolbarPrimaryAction} onClick={expandAll}>
<UnfoldMoreIcon color="primary" />
</IconButton>
</Tooltip>
<Tooltip title={labels?.toolbar?.expandTree || 'Expand tree'}>
<Button
variant="contained"
color="primary"
className={classes.toolbarPrimaryAction}
startIcon={<AccountTreeIcon />}
onClick={expandTree}
/>
<IconButton className={classes.toolbarPrimaryAction} onClick={expandTree}>
<AccountTreeIcon color="primary" />
</IconButton>
</Tooltip>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/charts/ScenarioManagerTreeList/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const useStyles = makeStyles((theme) => ({
display: 'flex',
flexDirection: 'row',
alignItems: 'flex-start',
justifyContent: 'flex-start',
justifyContent: 'center',
},
treesContainer: {
height: `calc(100% - ${TREES_CONTAINER_OFFSET}px)`, // Offset by header height + search bar height
Expand Down

0 comments on commit 4b3e851

Please sign in to comment.