Skip to content

Commit 6617d11

Browse files
committed
Added a Codepen component
1 parent dd2da6b commit 6617d11

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/**
2+
Usage:
3+
<Codepen
4+
title="Love or Hate?"
5+
pen="812699ce32c9a7aeb70c9384b32a533a"
6+
user="sol0mka"
7+
/>
8+
*/
9+
<template>
10+
<div>
11+
<p class="codepen" data-height="600" data-theme-id="dark" data-default-tab="result" :data-user="user" :data-slug-hash="pen" data-preview="true" style="height: 600px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;" :data-pen-title="title">
12+
<span>See the Pen <a :href="`https://codepen.io/{{user}}/full/${pen}/`">
13+
mograph</a> by LegoMushroom (<a :href="`https://codepen.io/${user}`">@{{user}}</a>)
14+
on <a href="https://codepen.io">CodePen</a>.</span>
15+
</p>
16+
<script async src="https://static.codepen.io/assets/embed/ei.js"></script>
17+
</div>
18+
</template>
19+
20+
<script>
21+
export default {
22+
23+
props: {
24+
title: { type: String, default: 'Pen' },
25+
pen: { type: String, default: 'RRRgLq' },
26+
user: { type: String, default: 'sol0mka' },
27+
}
28+
}
29+
</script>

0 commit comments

Comments
 (0)