Skip to content
Snippets Groups Projects
Commit 2016d3e4 authored by Alexandru Munteanu's avatar Alexandru Munteanu
Browse files

Add submit wizard component - WIP

parent e3ac79bc
No related branches found
No related tags found
No related merge requests found
Showing
with 62 additions and 0 deletions
{
"pubsweet-client": {
"API_ENDPOINT": "/api",
"login-redirect": "/",
"redux-log": false
},
"authsome": {
"mode": "/Users/alexandrumunt/Projects/Hindawi/xpub/packages/xpub-faraday/config/authsome.js",
"teams": {}
},
"validations": "/Users/alexandrumunt/Projects/Hindawi/xpub/packages/xpub-faraday/config/validations.js"
}
MANIFEST-000002
2018/01/09-16:57:26.634454 700011428000 Delete type=3 #1
File added
MANIFEST-000004
2018/01/09-16:57:47.142452 70000509e000 Recovering log #3
2018/01/09-16:57:47.142855 70000509e000 Level-0 table #5: started
2018/01/09-16:57:47.143583 70000509e000 Level-0 table #5: 339 bytes OK
2018/01/09-16:57:47.144913 70000509e000 Delete type=0 #3
2018/01/09-16:57:47.145131 70000509e000 Delete type=3 #2
2018/01/09-16:57:26.656703 70000fc1f000 Delete type=3 #1
File added
MANIFEST-000004
2018/01/09-16:57:30.590215 70000489b000 Recovering log #3
2018/01/09-16:57:30.591398 70000489b000 Level-0 table #5: started
2018/01/09-16:57:30.592943 70000489b000 Level-0 table #5: 1563 bytes OK
2018/01/09-16:57:30.594006 70000489b000 Delete type=0 #3
2018/01/09-16:57:30.594238 70000489b000 Delete type=3 #2
2018/01/09-16:57:26.241877 700010422000 Delete type=3 #1
File added
import React from 'react'
import { compose, withHandlers } from 'recompose'
import { withJournal } from 'xpub-journal'
const Wizard = ({ journal: { wizard }, renderStep }) => (
<div>
{wizard.map((e, i) => (
<div key={Math.random()}>
{e.label} - {e.title}
{e.children && e.children.map((c, i) => renderStep(c.type))}
</div>
))}
</div>
)
export default compose(
withHandlers({
renderStep: props => type => {
switch (type) {
case 'dropdown':
return <div>render dropdown</div>
case 'radio':
return <div>render radio</div>
case 'checkbox':
return <div>render checkbox</div>
default:
return null
}
},
}),
withJournal,
)(Wizard)
export { default as Wizard } from './components/Wizard'
...@@ -7,3 +7,4 @@ export { default as articleSections } from './article-sections' ...@@ -7,3 +7,4 @@ export { default as articleSections } from './article-sections'
export { default as articleTypes } from './article-types' export { default as articleTypes } from './article-types'
export { default as editors } from './editors' export { default as editors } from './editors'
export { default as roles } from './roles' export { default as roles } from './roles'
export { default as wizard } from './submit-wizard'
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment