Closed mbarton closed 1 day ago
@eatyourpeas I'm very new to this code so this might be a silly question but could we call makeAllStyles
from the stories to avoid getting out of sync in the future?
Loving the chromatic thank you @mbarton
The RCPCHChart component is really a wrapper for the CentileChart and SDSChart components. The styles are created before the RCPCHChart component is instantiated because the theme or custom style props passed in from the user need to be converted into the style object (using makeAllStyles
) before passing into whichever chart is then rendered.
So best of all would be to remove all the stories in there currently for SDSChart and CentileChart and have a library of examples all using RCPCHChart instead. Within the RCPCHChart folder we would have the docs (as they are now), and then subfolders for each of the different chart types, measurement methods, sexes and references. Perhaps a preterm section for each also.
Start up Storybook and visit the Centile Chart > With Height And No Data story.
It crashes with an error:
I think we are not passing
referenceTextStyle
in the styles hardcoded here? https://github.com/rcpch/digital-growth-charts-react-component-library/blob/live/src/testParameters/styles/tanner3Styles.ts. They perhaps need regenerating?