forked from srdjan/react-multistep
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
explicitly passing React children in the App
- Loading branch information
Srdjan
committed
Jan 22, 2023
1 parent
a45c6c5
commit af5fb5a
Showing
3 changed files
with
72 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import React from 'react' | ||
import ReactDOM from 'react-dom' | ||
import MultiStep from './index' | ||
import StepOne from './stepOne' | ||
import StepTwo from './stepTwo' | ||
import StepThree from './stepThree' | ||
import StepFour from './stepFour' | ||
|
||
const steps = [ | ||
{ component: <StepOne /> }, | ||
{ component: <StepTwo /> }, | ||
{ component: <StepThree /> }, | ||
{ component: <StepFour /> } | ||
] | ||
|
||
// custom styles | ||
const prevStyle = { background: '#33c3f0' } | ||
const nextStyle = { background: '#33c3f0' } | ||
|
||
const App = () => ( | ||
<div className='container'> | ||
<MultiStep activeStep={0} steps={steps} prevStyle={prevStyle} nextStyle={nextStyle} /> | ||
<div className='app-footer'> | ||
<h6>Press 'Enter' or click on progress bar for next step.</h6> | ||
Code is on{' '} | ||
<a href='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/Srdjan/react-multistep' target='_blank' rel='noreferrer'> | ||
github | ||
</a> | ||
</div> | ||
</div> | ||
) | ||
|
||
ReactDOM.render(<App />, document.getElementById('root')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters