-
Notifications
You must be signed in to change notification settings - Fork 10
/
shareButton.vue
87 lines (79 loc) · 1.43 KB
/
shareButton.vue
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
81
82
83
84
85
86
87
<template>
<div
class="vue-share-it-button"
:class="{
'dark': dark,
'light': !dark,
'dense': dense,
'outline': outline
}"
>
<slot></slot>
</div>
</template>
<script>
export default {
name: 'share-button',
props: {
dark: {
type: Boolean,
default: false
},
dense: {
type: Boolean,
default: false
},
outline: {
type: Boolean,
default: false
}
}
}
</script>
<style scoped>
.vue-share-it-button {
padding: 1em;
margin: 0 0.5em;
display: inline-flex;
font-size: 0.875rem;
box-shadow: none;
cursor: pointer;
align-items: center;
border-radius: 4px;
flex: 0 0 auto;
justify-content: center;
max-width: 100%;
outline: 0;
position: relative;
text-decoration: none;
text-indent: 0.0892857143em;
transition-duration: 0.28s;
transition-property: box-shadow, transform, opacity;
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
vertical-align: middle;
white-space: nowrap;
}
.light {
background: #f5f5f5;
color: rgba(0, 0, 0, 0.87);
}
.dark {
background: #212121 !important;
color: #ffffff !important;
}
.dense {
padding: 0.5em !important;
}
.vue-share-it-button label {
padding: 0 0.5em;
cursor: pointer;
}
.outline {
background: #ffffff !important;
border: 1px solid !important;
}
</style>