aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/components/competition-element.js33
-rw-r--r--src/components/my-icons.js13
2 files changed, 28 insertions, 18 deletions
diff --git a/src/components/competition-element.js b/src/components/competition-element.js
index 915de13..45655c8 100644
--- a/src/components/competition-element.js
+++ b/src/components/competition-element.js
@@ -22,14 +22,13 @@ class CompetitionElement extends LitElement {
${ButtonSharedStyles}
<style>
-
paper-card {
--paper-card-background-color: #f7f7f7;
width: 100%;
text-align: center;
}
-
</style>
+
<paper-card
onmouseover ="${() => this.toggleTab()}"
onmouseout ="${() => this.toggleTab()}">
@@ -43,9 +42,9 @@ class CompetitionElement extends LitElement {
class="info"
hidden="${props.isRegistered}"
raised
- disabled= "${!props.initialized}"
+ disabled= "${!props.signedIn}"
on-tap= "${() => this.registerComp()}">
- ${props.initialized? "Register" : "Sign In"}
+ ${props.signedIn? "Register" : "Sign In"}
</paper-button>
<paper-button class="success"
@@ -59,23 +58,23 @@ class CompetitionElement extends LitElement {
}
static get properties() { return {
- name: String,
- information: String,
- location: String,
- infoTabOpen: Boolean,
- initialized: Boolean,
- isRegistered: Boolean
+ name: String,
+ information: String,
+ location: String,
+ infoTabOpen: Boolean,
+ signedIn: Boolean,
+ isRegistered: Boolean
}};
constructor() {
super();
- this.name = "Competition";
- this.information = "Competition Information";
- this.location = "Competition Location";
- this.infoTabOpen = false;
- this.initialized = false;
- this.isRegistered = false;
+ this.name = "Competition";
+ this.information = "Competition Information";
+ this.location = "Competition Location";
+ this.infoTabOpen = false;
+ this.signedIn = false;
+ this.isRegistered = false;
}
toggleTab() {
@@ -86,10 +85,8 @@ class CompetitionElement extends LitElement {
if(confirm('Are you sure you want to register for ' + this.name + '?')) {
this.dispatchEvent(new CustomEvent('register-comp'));
}
-
}
-
}
window.customElements.define('competition-element', CompetitionElement);
diff --git a/src/components/my-icons.js b/src/components/my-icons.js
new file mode 100644
index 0000000..cbe3d9d
--- /dev/null
+++ b/src/components/my-icons.js
@@ -0,0 +1,13 @@
+/**
+@license
+Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
+This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
+The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
+The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
+Code distributed by Google as part of the polymer project is also
+subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
+*/
+
+import { html } from '@polymer/lit-element';
+
+export const menuIcon = html`<svg height="24" viewBox="0 0 24 24" width="24"><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"></path></svg>`;