Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
model.order.map(id =>
thunk(
String(id),
Wallpaper.view,
model.entries[id],
forward(address, ByID(String(id)))
)
))
model.order.map(id =>
thunk(
String(id),
Tile.view,
model.entries[String(id)],
forward(address, TileAction),
isDark
)
)
(model:Model, address:Address):DOM => {
if (!Runtime.useNativeTitlebar()) {
return Controls.view(model.controls, forward(address, ControlsAction))
} else {
return html.noscript()
}
}
(model:Model, address:Address):DOM =>
html.div({
key: 'window-controls',
className: 'window-controls',
style: styleSheet.container,
onMouseOver: forward(address, always(Over)),
onMouseOut: forward(address, always(Out))
}, [
viewClose(model.close, forward(address, CloseButtonAction)),
viewMinimize(model.minimize, forward(address, MinimizeButtonAction)),
viewToggle(model.toggle, forward(address, ToggleButtonAction))
])
(model:Model, address:Address):DOM => {
switch (model.type) {
case 'Search':
return Search.render(model.search, forward(address, tagSearch))
case 'History':
default:
return History.render(model.history, forward(address, tagHistory))
}
}
export var view = (model/*:Model*/, address/*:Address*/)/*:VirtualElement*/ => {
return html.span({key: 'counter'}, [
html.button({
key: 'decrement',
onClick: forward(address, Dec)
}, ["-"]),
html.span({
key: 'value',
style: counterStyle.value,
}, [String(model.value)]),
html.button({
key: 'increment',
onClick: forward(address, Inc)
}, ["+"])
]);
};
export var view = (model/*:Model*/, address/*:Address*/)/*:VirtualElement*/ => {
return html.span({key: 'counter'}, [
html.button({
key: 'decrement',
onClick: forward(address, Dec)
}, ["-"]),
html.span({
key: 'value',
style: counterStyle.value,
}, [String(model.value)]),
html.button({
key: 'increment',
onClick: forward(address, Inc)
}, ["+"])
]);
};
export const view = (model/*:Model*/, address/*:Address*/)/*:VirtualElement*/ =>
html.div({key: "gif-viewer", style: style.viewer}, [
html.h2({key: "header", style: style.header}, [model.topic]),
html.div({key: "image", style: style.image(model.uri)}),
html.button({key: "button", onClick: forward(address, RequestMoreAction)}, [
"More please!"
])
])
const viewEntry = ({id, model}/*:Entry*/, address/*:Address*/)/*:VirtualElement*/ =>
html.div({key: id}, [
Counter.view(model, forward(address, CounterList.by(id))),
html.button({
key: 'remove',
onClick: forward(address, removeForID(id))
}, 'x')
])
(model:Model, address:Address):DOM => (
html.div({
className: 'wallpaper-choice',
onClick: forward(address, always(Choose)),
style: Style.mix(
styleSheet.base,
{ backgroundColor: model.color }
)
})
)