1.0.24 ā¢ Published 8 days ago
svelte-code-copy v1.0.24
svelte-code-copy
ā Just wrap it with this
Demo
Installation
npm i svelte-code-copy
Usage
pre
is optional.
<CodeCopy>
copies the innerText
of <code>
<script>
import { CodeCopy } from 'svelte-code-copy'
</script>
<CodeCopy>
<pre>
<code>
<!-- Your code block -->
</code>
</pre>
</CodeCopy>
Props
Prop | Type | Default |
---|---|---|
onCopy | function | undefined |
size | number | 18 |
background | string | transparent |
color | string | whitesmoke |
success | string | green |
error | string | red |
top | string | 0.5rem |
right | string | 0.5rem |
border | string | none |
padding | string | 0.25rem |
borderRadius | string | 0.25rem |
margin | string | 0 |
effect | string | pop |
duration | number | 150 |
License
1.0.24
8 days ago
1.0.23
18 days ago
1.0.22
27 days ago
1.0.21
1 month ago
1.0.20
1 month ago
1.0.19
1 month ago
1.0.18
2 months ago
1.0.17
2 months ago
1.0.16
3 months ago
1.0.15
3 months ago
1.0.14
3 months ago
1.0.13
3 months ago
1.0.11
3 months ago
1.0.12
3 months ago
1.0.9
4 months ago
1.0.10
4 months ago
1.0.8
4 months ago
1.0.7
4 months ago
1.0.6
4 months ago
1.0.5
5 months ago
1.0.4
5 months ago
1.0.3
5 months ago
1.0.2
5 months ago
1.0.1
5 months ago
1.0.0
5 months ago
0.2.0
5 months ago
0.1.2
5 months ago
0.1.1
5 months ago
0.1.0
5 months ago
0.0.2
5 months ago
0.0.1
5 months ago