From 84e15b866786854073feefce2392b47a3d84d724 Mon Sep 17 00:00:00 2001 From: Michael Foiani Date: Thu, 26 Jul 2018 23:37:41 -0400 Subject: Created styling and backend for users to sign up for competitions. --- src/components/button-shared-styles.js | 12 +++ src/components/competition-element.js | 38 +++++++++- src/components/mao-competitions.js | 134 ++++++++++++++++++++++++--------- src/components/test-element.js | 84 +++++++++++++++++++++ 4 files changed, 229 insertions(+), 39 deletions(-) create mode 100644 src/components/test-element.js (limited to 'src/components') diff --git a/src/components/button-shared-styles.js b/src/components/button-shared-styles.js index 2f167e4..5f426a4 100644 --- a/src/components/button-shared-styles.js +++ b/src/components/button-shared-styles.js @@ -22,5 +22,17 @@ export const ButtonSharedStyles = html` button:hover svg { fill: var(--app-primary-color); } + + paper-button { + text-align: center; + } + + paper-button.info { + background-color: #c9eaff; + } + + paper-button.success { + background-color: #b7e1cd; + } `; diff --git a/src/components/competition-element.js b/src/components/competition-element.js index 072f654..17381c9 100644 --- a/src/components/competition-element.js +++ b/src/components/competition-element.js @@ -10,12 +10,17 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN import { LitElement, html } from '@polymer/lit-element'; +// Import button styles +import { ButtonSharedStyles } from './button-shared-styles.js'; + // Import paper elements import '@polymer/paper-card/paper-card.js'; class CompetitionElement extends LitElement { _render(props) { return html` + ${ButtonSharedStyles} + + +
+

${props.information}

+
+
+ + + +
+
+ `; + } + + static get properties() { return { + name: String, + information: String, + image: String, + initialized: Boolean, + isRegistered: Boolean + }}; + + constructor() { + super(); + + this.name = "Competition"; + this.information = "Competition Information"; + this.image = "Image Path"; + this.initialized = false; + this.isRegistered = false; + } + + registerComp() { + this.dispatchEvent(new CustomEvent('register-comp')); + this.isRegistered = true; + } + + +} + +window.customElements.define('test-element', TestElement); -- cgit v1.2.3-70-g09d2