Refactor default prop values into util file (Closes #82) #87
Loading…
Reference in New Issue
No description provided.
Delete Branch "default-graph-prop-values"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR creates a new util file
DefaultProp
that provides default prop values for graph/chart components. More values could be added in the future as the pages are developed.staging: (shahan: sorry, due to a unlucky naming this branch name doesnt work with staging )
LGTM, pending renaming width to "pageWidth". Let's add the dynamic components in a seperate pr.
@ -30,15 +37,6 @@ export default function Demographics() {
const { width } = useWindowDimensions();
as mentioned before, this should be renamed to "pageWidth"
@ -0,0 +12,4 @@
const graphWidth = (
isMobile: boolean,
width: number,
I think all the cases of width that refer to the page width, such as this one, ones below and above, should be renamed to pageWidth. On first glance, its pretty confusing to read this code without realizing that "width" refers to the page width (and not the desired witdh of the graph)
Especially for the barGraphProps function.