-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathpaper-fab-speed-dial-action.html
80 lines (62 loc) · 2.17 KB
/
paper-fab-speed-dial-action.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
75
76
77
78
79
80
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<!--
An action within a material design [Floating Action Button with Speed Dial](https://www.google.com/design/spec/components/buttons-floating-action-button.html#buttons-floating-action-button-transitions)
### Styling
Style | Description
------------------------------------------------------- | ------------
--paper-fab-speed-dial-action-label-color | The text color of label
--paper-fab-speed-dial-action-label-background | The background color of label
--paper-fab-speed-dial-action-background | The background color of the Floating Action Button
--paper-fab-speed-dial-action-keyboard-focus-background | The background color of the Floating Action Button when focused
### Example
```html
<paper-fab-speed-dial-action icon="icons:content-copy">Copy</paper-fab-speed-dial-action>
```
@demo demo/index.html
-->
<dom-module id="paper-fab-speed-dial-action">
<template>
<style>
:host {
@apply --layout-horizontal;
@apply --layout-center;
@apply --layout-end-justified;
margin-top: 15px;
margin-right: 8px;
/** For IE11: otherwise the label overlays the FAB */
min-width: 270px;
}
.label {
color: var(--paper-fab-speed-dial-action-label-color, black);
background: var(--paper-fab-speed-dial-action-label-background, white);
padding: 5px 10px;
border-radius: 3px;
margin-right: 20px;
}
.fab {
--paper-fab-background: var(--paper-fab-speed-dial-action-background);
--paper-fab-keyboard-focus-background: var(--paper-fab-speed-dial-action-keyboard-focus-background);
}
.label,.fab {
display: inline-block;
}
</style>
<div class="flex"><span class="label"><slot></slot></span></div>
<paper-fab class="fab" icon=[[icon]] mini></paper-fab>
</template>
</dom-module>
<script>
(function() {
Polymer({
is: 'paper-fab-speed-dial-action',
properties: {
/**
* Icon that is shown next to the content
*/
icon: String
}
});
})();
</script>