-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfs-person-card.html
74 lines (63 loc) · 1.9 KB
/
fs-person-card.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<link rel="import" href="../polymer/polymer-element.html">
<link rel="import" href="../fs-api-aware/fs-api-aware.html">
<link rel="import" href="../fs-person-summary/fs-person-summary.html">
<link rel="import" href="../paper-card/paper-card.html">
<!--
A FamilySearch person card.
Basic example:
<fs-person-card person-id="PPP-PPPP"></fs-person-card>
You can also specify toolbar actions for the paper card:
<fs-person-card person-id="PPP-PPPP">
<div class="card-actions">
<paper-button>Action</paper-button>
<paper-icon-button icon="favorite"></paper-icon-button>
</div>
</fs-person-card>
### Styling
The following custom properties are available for styling:
Custom property | Description | Default
----------------|-------------|----------
`--fs-person-card-width` | The width of the card | `400px`
You may also use the `fs-person-portrait` custom style properties to style the portrait.
@group FamilySearch Elements
@element fs-person-card
@demo demo/index.html
-->
<dom-module id="fs-person-card">
<template>
<style>
:host {
width: var(--fs-person-card-width, 400px);
display: block;
}
paper-card {
display: block;
}
</style>
<paper-card>
<div class="card-content">
<fs-person-summary person-id="{{personId}}" client-name="[[clientName]]"></fs-person-summary>
</div>
<slot></slot>
</paper-card>
</template>
<script>
class FSPersonCard extends FSApiAwareMixin(Polymer.Element) {
static get is() { return 'fs-person-card'; }
static get properties() {
return {
/**
* Person ID
*
* @type String
*/
personId: {
type: String,
reflectToAttribute: true
}
};
}
}
customElements.define(FSPersonCard.is, FSPersonCard);
</script>
</dom-module>