Skip to content
This repository has been archived by the owner on Oct 3, 2021. It is now read-only.

Using content #28

Open
urjitdesai opened this issue May 11, 2021 · 1 comment
Open

Using content #28

urjitdesai opened this issue May 11, 2021 · 1 comment

Comments

@urjitdesai
Copy link

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
Copy link
Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant