generated from EyeSeeTea/dhis2-app-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Edit existing event tracker + summary form with visualisations
- Loading branch information
Showing
6 changed files
with
164 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import React from "react"; | ||
import { VisualizationTypes } from "../../pages/event-tracker/EventTrackerPage"; | ||
import styled from "styled-components"; | ||
import { Section } from "../section/Section"; | ||
|
||
type VisualisationProps = { | ||
type: VisualizationTypes; | ||
title: string; | ||
hasSeparator?: boolean; | ||
lastUpdated?: string; | ||
}; | ||
export const Visualisation: React.FC<VisualisationProps> = React.memo(props => { | ||
const { title, hasSeparator, lastUpdated } = props; | ||
return ( | ||
<Section | ||
title={title} | ||
hasSeparator={hasSeparator} | ||
titleVariant="secondary" | ||
lastUpdated={lastUpdated} | ||
> | ||
<VisualisationContainer>{`Coming soon!`}</VisualisationContainer> | ||
</Section> | ||
); | ||
}); | ||
|
||
const VisualisationContainer = styled.div` | ||
width: 100%; | ||
height: 25rem; | ||
border: 0.1rem solid black; | ||
background: ${props => props.theme.palette.primary.contrastText}; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
margin-bottom: 2rem; | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters