diff --git a/src/components/Layout.js b/src/components/Layout.js new file mode 100644 index 0000000..1674445 --- /dev/null +++ b/src/components/Layout.js @@ -0,0 +1,9 @@ +export default initial_vnode => { + return { + view: vnode => [ + vnode.attrs.prologue, + m('main', vnode.children), + vnode.attrs.epilogue + ] + } +} diff --git a/src/util/with_layout.js b/src/util/with_layout.js deleted file mode 100644 index 3b60784..0000000 --- a/src/util/with_layout.js +++ /dev/null @@ -1,15 +0,0 @@ -export default options => { - if (typeof options == 'undefined') - options = {} - - if (!options.hasOwnProperty('content')) - options = {'content': options} - - return { - view: vnode => [ - options.prologue, - m('main', options.content), - options.epilogue - ] - } -}