Refactor default prop values into util file (Closes #82) #87
Merged
e26chiu
merged 5 commits from default-graph-prop-values
into main
2 months ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'default-graph-prop-values'
Deleting a branch is permanent. It CANNOT be undone. 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.
const { width } = useWindowDimensions();
as mentioned before, this should be renamed to "pageWidth"
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.
1c0191facc
into main 2 months agoReviewers
1c0191facc
.