-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
142 lines (113 loc) · 3.94 KB
/
index.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>copy-me</title>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Karla:wght@200&display=swap" rel="stylesheet">
<link rel="stylesheet" href="./style.css">
<script src="https://unpkg.com/@bibhuticoder/copy-me"></script>
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.12"></script>
<link rel="stylesheet" href="//unpkg.com/@highlightjs/cdn-assets@10.5.0/styles/dracula.min.css">
<script src="//unpkg.com/@highlightjs/cdn-assets@10.5.0/highlight.min.js"></script>
</head>
<body>
<div id="app">
<h1 class="heading">copy-me</h1>
<h2>
Dead simple vue.js component for copying text
</h2>
<div class="card-container">
<div class="card">
<h2 class="text-center">Usage</h2>
<div class="code">
<pre><code class="bash">npm i @bibhuticoder/copy-me</code></pre>
<pre><code class="language-xml">
<template>
<copy-me :text="I'm copied"ß>
<button slot="handler"> Click Me </button>
</copy-me>
</template>
</code></pre>
<pre><code class="vue">import CopyMe from "@bibhuticoder/copy-me";
export default {
name: "Your-Component",
components: {
CopyMe: 'copy-me'
}
}</code></pre>
</div>
</div>
<div class="card" id="vue-app">
<h2 class="text-center">Examples</h2>
<copy-me text="asdasdas" @fail="handleFail">
<button slot="handler">copy</button>
</copy-me>
</div>
</div>
<div class="card-container">
<div class="card">
<h2 class="text-center">Props</h2>
<table class="table">
<thead>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</thead>
<tbody>
<tr>
<td>text*</td>
<td>String</td>
<td>Text to be copied</td>
</tr>
<tr>
<td>notify</td>
<td>Boolean</td>
<td>Default: true</td>
</tr>
<tr>
<td>successMessage</td>
<td>String</td>
<td>Default: "Copied"</td>
</tr>
<tr>
<td>failMessage</td>
<td>String</td>
<td>Default: "Fail"</td>
</tr>
<tr>
<td>toastCss</td>
<td>String</td>
<td>Default: ""</td>
</tr>
</tbody>
</table>
</div>
<div class="card">
<h2 class="text-center">Events</h2>
</div>
</div>
</div>
<script>
var app = new Vue({
el: '#vvue-aßpp',
data: {
message: 'Hello Vue!'
},
// mounted(){
// console.log()
// this.$refs.vueCode.innerHTML = `
// `;
// },
methods: {
handleFail() {
alert("fail");
}
}
})
Vue.component(CopyMe.name, CopyMe);
</script>
<script>hljs.initHighlightingOnLoad();</script>
</body>
</html>