Created
January 18, 2018 14:42
-
-
Save panoply/d823dd4e67d19cbf51bdfe44a387fbaa to your computer and use it in GitHub Desktop.
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
class Example { | |
fn(){ | |
const root = document.querySelector('#locale') | |
const component = { | |
view(vnode){ | |
return m(".ul.dash", [ | |
m('li.shipping', [ | |
m("span.float-none float-md-left pr-2", "Shipping:"), | |
m("button.shipping__button", { | |
style: { | |
width: "40px", | |
backgroundImage: "url("+store.get('locale').flag_path+")", | |
}, | |
onclick: () => modal.open('#modal-shipping') | |
}, store.get('locale').code) | |
]), | |
m('li.currency', [ | |
m("span.float-none float-md-left pr-2", "Currency"), | |
m('button.button__currency--open[type="button"]', [ | |
m("span", store.get('locale').currency) | |
]) | |
]) | |
]) | |
} | |
} | |
m.mount(root, component) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment