-
Notifications
You must be signed in to change notification settings - Fork 1
/
ford-app-message.html
47 lines (43 loc) · 1.15 KB
/
ford-app-message.html
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
38
39
40
41
42
43
44
45
46
47
<link rel="import" href="../polymer/polymer-element.html">
<link rel="import" href="demo/redux-mixin.html">
<dom-module id="ford-app-message">
<template>
<style>
:host {
display: block;
}
#backgroundSection {
width:100px;
height:100px;
}
</style>
<h3>Redux - [[bkgroundcolor]] </h3>
<div class="section">
<div style$="background-color:[[bkgroundcolor]]"id="backgroundSection"></div>
<button on-click="changeColor" data-color="green">Green</button>
<button on-click="changeColor" data-color="blue">Blue</button>
<button on-click="changeColor" data-color="red">Red</button>
</div>
</template>
<script>
/**
* `ford-app-redux`
*
*
* @customElement
* @polymer
* @demo demo/index.html
*/
MessageMixin = Parent => class MessageMixin extends ReduxMixin(Parent) {
static get properties() {
return {
message: {
type: String,
statePath: 'bkcolor'
}
}
}
}
window.customElements.define(FordAppMessage.is, FordAppMessage);
</script>
</dom-module>