CharlestonREM / MedsyPurchase

theme from themeforest
medsy-minimal-test-git-main.charlestonrem.vercel.app
0 stars 0 forks source link

Creating the `RadioGroupTabsDiscreteSlider` as a custom Formik component #2

Open CharlestonREM opened 3 years ago

CharlestonREM commented 3 years ago

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 field

  1. It needs to utilize the material ui Tabs & Tab Components
  2. when the component mounts, it needs to pass its value property (see tabs props here) via React's useEffect hook to Formik to update the field value with the name propertyType.
  3. Each Tab component corresponds to an individual radio button selection (check wireframe below)

Discrete slider child component corresponding to the propertySize field

  1. It needs to utilize the material ui Slider component
  2. It will pass a range value integer between 1 to 6 corresponding to the Lvl variable in the pricing calculation to the calculator context provider via a dispatch.

wireframes

image

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

CharlestonREM commented 3 years ago

Check out the Calculator context

Hey @Amin-Essid, I created an issue for you to reference when dispatching to the CalculatorContext. https://github.com/CharlestonREM/MedsyPurchase/issues/3

CharlestonREM commented 3 years ago

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

image

CharlestonREM commented 3 years ago

tasklist @Amin-Essid