import {MagicHatNoState} from 'react-magic-hat'
import {ComponentA, ComponentB} from 'components'
const renderFrame = ({id, page, activePage, state, actions}) => {
const Frame = id === 'componentA' ? ComponentA : ComponentB
return <Frame />
}
const options = {
pages: [
{
id: 'componentA'
},
{
id: 'componentB'
}
],
activePage: 1,
renderFrame
}
const Layout = () => (
<div>
<MagicHatNoState {...options} />
</div>
)
PRs accepted.
MIT © 2018 Albino Tonnina