Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scenario card arrows added #149

Merged
merged 9 commits into from
Oct 26, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions frontend/src/components/ScenarioCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import {Dictionary} from '../util/util';
import {useTranslation} from 'react-i18next';
import {NumberFormatter} from '../util/hooks';
import {CheckBoxOutlineBlank, CheckBox} from '@mui/icons-material';
import ArrowDropUpIcon from '@mui/icons-material/ArrowDropUp';
import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown';

/**
* React Component to render individual Scenario Card
Expand Down Expand Up @@ -202,6 +204,7 @@ export default function ScenarioCard(props: ScenarioCardProps): JSX.Element {
{compartments.map((compartment, i) => (
// hide compartment if expandProperties false and index > 4
// highlight compartment if selectedProperty === compartment

<ListItem
key={compartment}
sx={{
Expand Down Expand Up @@ -234,7 +237,19 @@ export default function ScenarioCard(props: ScenarioCardProps): JSX.Element {
flexBasis: '45%',
}}
/>
<ArrowDropDownIcon
color={'success'}
fontSize={'large'}
sx={{display: parseFloat(getCompartmentRate(compartment)) <= 0 ? 'block':'none'}}
></ArrowDropDownIcon>
<ArrowDropUpIcon
color={'error'}
fontSize={'large'}
sx={{display: parseFloat(getCompartmentRate(compartment)) <= 0 ? 'none':'block'}}
>
</ArrowDropUpIcon>
</ListItem>

))}
</List>
</Box>
Expand Down