react-step-progress icon indicating copy to clipboard operation
react-step-progress copied to clipboard

Using content

Open urjitdesai opened this issue 4 years ago • 1 comments

I want to pass props to my component that is being rendered in the content. I am a newbie and don't know how should i go about it. Please help. Code:-

const step1Content=({handleSelectModelCategory, modelCategoryOptions})=>{ console.log("props= ", handleSelectModelCategory, modelCategoryOptions); return (

Select A Model For Testing
<Select styles={{ menu: provided => ({ ...provided, zIndex: 9999 }) }} className="basic-single" classNamePrefix="select" defaultValue="Select Model Category" //value={instanceType} onChange={handleSelectModelCategory} maxMenuHeight={200} name="color" options={modelCategoryOptions} placeholder='Select Model Category' style={{ color: "black", width:'200px'}} />
) }

<StepProgressBar startingStep={0} onSubmit={onFormSubmit} steps={[ { label: 'Step 1', subtitle: '10%', name: 'step 1', content: ()=>step1Content(handleSelectModelCategory, modelCategoryOptions)

                    },
                    {
                    label: 'Step 2',
                    subtitle: '50%',
                    name: 'step 2',
                    content: step2Content,
                    validator: step2Validator
                    },
                    {
                    label: 'Step 3',
                    subtitle: '100%',
                    name: 'step 3',
                    content: step3Content,
                    validator: step3Validator
                    }
                ]}
            />

urjitdesai avatar May 11 '21 07:05 urjitdesai

content: ()=>step1Content(handleSelectModelCategory, modelCategoryOptions) I know this line is wrong but how should i do it?

urjitdesai avatar May 11 '21 07:05 urjitdesai