Open CharlestonREM opened 3 years ago
Hey @Amin-Essid, I created an issue for you to reference when dispatching to the CalculatorContext
.
https://github.com/CharlestonREM/MedsyPurchase/issues/3
Check out the current state of the temporary radio button group and select component that i am currently using to dispatch state changes when the field's onChange
event is triggered:
https://medsy-minimal-test-2fhu1l3ph-charlestonrem.vercel.app/crem
<AminRadioGroupTabsDiscreteSlider />
in the components/formik-controls/
directoryonChange
event fires and demonstrate with a console log
the first fields in the app
Hello @Amin-Essid ! These fields are the first formik fields in the form, and pass vital variables to the calculator provider state
overview of component specs
We need to create two fields in one custom component
Radio Group Tabs parent Component corresponding to the
propertyType
fieldvalue
property (see tabs props here) via React'suseEffect
hook to Formik to update the field value with the namepropertyType
.Tab
component corresponds to an individual radio button selection (check wireframe below)Discrete slider child component corresponding to the
propertySize
fieldSlider
component1
to6
corresponding to theLvl
variable in the pricing calculation to the calculator context provider via a dispatch.wireframes
an old attempt
@Amin-Essid, you might be able to pick up where I left off in the component below. Take a look and let me know what you think.
https://github.com/CharlestonREM/MedsyPurchase/blob/main/medsy/packages/medsy-minimal/src/components/formik-controls/radio-group-tabs-discrete-slider.tsx