-
Notifications
You must be signed in to change notification settings - Fork 2
/
example.marko
37 lines (34 loc) · 849 Bytes
/
example.marko
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!-- Used with permission from https://github.com/charlieduong94/marko-snackbars -->
<!--
this is a comment
-->
// single line comment
/*
multiline comment
*/
div [
class=[
'mn-snackbar',
'transition-' + state.transitionDirection,
state.animate ? '' : 'conceal',
state.remove ? 'remove' : '',
state.slideOut ? 'slide-out': '',
data.class
]
style={
color: state.messageColor,
'background-color': state.bgColor,
'border-color': state.bgColor
}
onClick('handleClick')
]
label class='mn-message'
-- ${state.message}
if(state.buttons)
for(var i = 0; i < state.buttons.length; i++)
button [
data-pos=i
class='mn-snack-button ${data.buttons[i].class}'
style={color: state.buttons[i].color}
onClick('handleButtonClick')
] -- ${state.buttons[i].text}