Created
September 25, 2017 18:39
-
-
Save popcorn245/99d0a5d7b0513baec763752596482ee7 to your computer and use it in GitHub Desktop.
Stencil with Import
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, Prop } from '@stencil/core'; | |
import Ajax from 'ajax-promise-es6'; | |
@Component({ | |
tag: 'ft-irma', | |
styleUrl: 'ft-irma.scss' | |
}) | |
export class FtIrma { | |
render() { | |
return [ | |
<ft-nav></ft-nav>, | |
<ft-banner src="./assets/img/banner.jpg" title="Disaster Response" sub="For Hurricane Irma"></ft-banner>, | |
<mission-statement></mission-statement>, | |
<ft-services title="Water Damage Services" sub="Commercial & Residential"></ft-services>, | |
<ft-difference sub="The Flood Team Difference!"></ft-difference>, <ft-rental></ft-rental>, <contact-form onSubmit={this.addTicket} title="Contact Us" sub="If you need help fast, The Flood Team Restoration services: Miami-Dade, Broward, Palm Beach and Monroe County. We focus on Water Damage, Mold Damage, and Contents Cleaning Services. Contact us we are happy to help anyway we can. Call or Email us, we are here for you 24/7!"></contact-form> | |
]; | |
} | |
addTicket(event: UIEvent, customer:any = {}) { | |
event.preventDefault(); | |
Ajax.post( | |
'https://api.website.com/v1/customer', | |
{ | |
...customer | |
} | |
).then(function (response) { | |
console.log(response); | |
}) | |
.catch(function (error) { | |
console.log(error); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment