Skip to content

Commit

Permalink
style: Added conditional expand less icon
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelkoelle committed Oct 28, 2020
1 parent cabab6b commit e211bb5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/features/schema-generator/TaskScheme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/* eslint-disable jsx-a11y/no-static-element-interactions */
import React, { ChangeEvent } from 'react';
import TextField from '@material-ui/core/TextField';
import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
import {
Button,
ButtonGroup,
Expand All @@ -14,6 +13,7 @@ import {
InputAdornment,
OutlinedInput,
} from '@material-ui/core';
import { ExpandLess, ExpandMore } from '@material-ui/icons';
import styles from './TaskScheme.css';
import { hasTasksWithZeroMax, sumParam } from '../../utils/FileAccess';

Expand Down Expand Up @@ -180,7 +180,11 @@ export default function TaskScheme(props: any) {
className={styles.expand}
size="medium"
>
<ExpandMoreIcon className={styles.expandIcon} />
{expanded ? (
<ExpandLess className={styles.expandIcon} />
) : (
<ExpandMore className={styles.expandIcon} />
)}
</IconButton>
<Collapse in={expanded} timeout="auto" unmountOnExit>
<TextField
Expand Down

0 comments on commit e211bb5

Please sign in to comment.