-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbutton-connect-facebook.html
42 lines (33 loc) · 1.04 KB
/
button-connect-facebook.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
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../oauth-connect-facebook/oauth-connect-facebook.html">
<link rel="import" href="../oauth-session/oauth-session.html">
<link rel="import" href="../../styles/style-button/style-button.html">
<dom-module id="button-connect-facebook">
<style include="style-button"></style>
<style>
:host {
display: inline-block;
}
.btn{
@apply(--button-connect-facebook);
}
</style>
<template>
<oauth-session id="session" is-authenticated="{{isAuthenticated}}"></oauth-session>
<oauth-connect-facebook id="service" client_id="{{client_id}}"></oauth-connect-facebook>
<button class="btn btn-sm btn-primary" disabled$="{{isAuthenticated}}" on-click="connect" on-click="on_submit">Sign In with Facebook</button>
</template>
</dom-module>
<script>
Polymer({
is: 'button-connect-facebook',
properties: {
client_id: {
type: String
}
},
connect: function () {
this.$.service.connect();
}
});
</script>