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

Feat/new dashboard #96

Merged
merged 11 commits into from
Jan 21, 2024
2 changes: 1 addition & 1 deletion frontend/src/components/base/headings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const H2 = styled.h2`
font-size: 1.25rem;
font-weight: normal;
margin: 0;
padding: 0.75rem 0;
padding: 0.25rem 0;
`;

/**
Expand Down
83 changes: 59 additions & 24 deletions frontend/src/components/base/progress-step.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,26 @@ import {
} from "./flex";
import { Subheading } from "./headings";

const StepConnector = styled(StyleableFlexContainer)`
position: relative;

:after {
position: absolute;
left: 0.6rem;
top: 3rem;
content: "";
border-left: 2px dashed grey;
margin-left: 5px;
height: 100%;
}

:last-child:after {
display: none;
}
`;

const StepContainer = styled(StyleableFlexContainer)`
padding-top: 0.5rem;
position: relative;
`;

const StepIndex = styled(StyleableFlexContainer)`
Expand All @@ -20,6 +38,7 @@ const StepIndex = styled(StyleableFlexContainer)`
border: 1px dashed #333;
width: 2rem;
height: 2rem;
background-color: white;
`;

/**
Expand Down Expand Up @@ -59,31 +78,47 @@ export const ProgressStep = ({
state,
title,
}: IProgressStepProps) => (
<FlexColumnContainer>
<Spacer />

<FlexRowContainer>
<StepContainer>
<StepIndex
style={
state === ProgressStepState.Completed
? completedStyle
: state === ProgressStepState.Failed
? failedStyle
: undefined
}
>
<CenteredContainer>{index}</CenteredContainer>
</StepIndex>
</StepContainer>
<StepConnector
className={
state === ProgressStepState.Completed
? "completedStepConnector"
: "pendingStepConnector"
}
>
<style>{`
.pendingStepConnector:after {
border-left: 2px dashed grey;
}

.completedStepConnector:after {
border-left: 2px solid #56d175;
}
`}</style>
<FlexColumnContainer>
<Spacer />

<FlexRowColumnContainer>
<Subheading text={title} />
<FlexRowContainer>
<StepContainer>
<StepIndex
style={
state === ProgressStepState.Completed
? completedStyle
: state === ProgressStepState.Failed
? failedStyle
: undefined
}
>
<CenteredContainer>{index}</CenteredContainer>
</StepIndex>
</StepContainer>
<Spacer />
<FlexRowColumnContainer>
<Subheading text={title} />

{children}
</FlexRowColumnContainer>
</FlexRowContainer>
</FlexColumnContainer>
{children}
</FlexRowColumnContainer>
<Spacer /> <Spacer />
</FlexRowContainer>
</FlexColumnContainer>
</StepConnector>
);
2 changes: 1 addition & 1 deletion frontend/src/components/pages/admission.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const TableHeaderCell = styled.th`

border-right: 1px solid #555;

:last-of-type {
:last-of-type:after {
border: none;
}
`;
Expand Down
1 change: 0 additions & 1 deletion frontend/src/components/pages/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { StyleableFlexContainer } from "../base/flex";

const PaddedContainer = styled(StyleableFlexContainer)`
padding: 2rem;
height: 100%;
`;

interface IPageContainerProps {
Expand Down
Loading
Loading