Skip to content

Commit

Permalink
cleanup css
Browse files Browse the repository at this point in the history
  • Loading branch information
Afani97 committed Aug 4, 2023
1 parent 826b14b commit 1c9c283
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
16 changes: 4 additions & 12 deletions frontend/src/Components/Charts/TrafficStops/TrafficStops.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import TrafficStopsStyled, {
LineWrapper,
PieWrapper,
StopGroupsContainer,
SwitchContainer,
} from './TrafficStops.styled';
import * as S from '../ChartSections/ChartsCommon.styled';
import { useTheme } from 'styled-components';
Expand Down Expand Up @@ -721,19 +722,10 @@ function TrafficStops(props) {
options={groupedStopPurposeModalData.purposeTypes}
/>
</NewModal>
<div
style={{
display: 'flex',
flexDirection: 'row',
gap: '10px',
marginTop: '10px',
marginBottom: '10px',
alignItems: 'center',
}}
>
<SwitchContainer>
<span>Switch to {checked ? 'line' : 'pie'} charts</span>
<Switch onChange={handleChange} checked={checked} className="react-switch" />
</div>
</SwitchContainer>
<LineWrapper visible={checked === false}>
<GroupedStopsContainer visible={visibleStopsGroupedByPurpose[0].visible}>
<LineChart
Expand Down Expand Up @@ -812,7 +804,7 @@ function TrafficStops(props) {

<div style={{ marginTop: '2em' }}>
<P weight={WEIGHTS[1]}>Toggle graphs:</P>
<div style={{ display: 'flex', gap: '10px', flexDirection: 'row' }}>
<div style={{ display: 'flex', gap: '10px', flexDirection: 'row', flexWrap: 'wrap' }}>
{visibleStopsGroupedByPurpose.map((vg, i) => (
<Checkbox
height={25}
Expand Down
10 changes: 10 additions & 0 deletions frontend/src/Components/Charts/TrafficStops/TrafficStops.styled.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const PieWrapper = styled.div`
flex-direction: row;
flex-wrap: wrap;
gap: 10px;
justify-content: space-evenly;
`;

export const StopGroupsContainer = styled.div`
Expand All @@ -37,3 +38,12 @@ export const GroupedStopsContainer = styled.div`
}
display: ${(props) => (props.visible ? 'block' : 'none')};
`;

export const SwitchContainer = styled.div`
display: flex;
flex-direction: row;
gap: 10px;
margin-top: 10px;
margin-bottom: 10px;
align-items: center;
`;

0 comments on commit 1c9c283

Please sign in to comment.