Skip to content

Commit ab72fb9

Browse files
author
Dominik Grenz
committed
Initial setup for dev component
1 parent da426f7 commit ab72fb9

File tree

4 files changed

+95
-0
lines changed

4 files changed

+95
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta
6+
name="robots"
7+
content="noindex"
8+
/>
9+
<link
10+
href="/favicon.ico"
11+
rel="icon"
12+
/>
13+
<meta
14+
content="width=device-width, initial-scale=1.0"
15+
name="viewport"
16+
/>
17+
<title>personalization-webcomponent</title>
18+
19+
<!-- Muenchen.de Fontfaces -->
20+
<link
21+
href="https://assets.muenchen.de/mde/1.0.10/css/fonts.css"
22+
rel="stylesheet"
23+
/>
24+
25+
<!-- built files will be auto injected -->
26+
<script src="src/checklist-domi-webcomponent.ts" type="module"></script>
27+
</head>
28+
<body>
29+
<noscript>
30+
<strong>
31+
In order for the development page to work correctly, JavaScript needs to
32+
be activated.
33+
</strong>
34+
</noscript>
35+
<div>
36+
<checklist-domi first-name="Domi"/>
37+
</div>
38+
</body>
39+
</html>

personalization-webcomponents/index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ <h1>The following webcomponents are available:</h1>
4242
<li>
4343
<a href="index-my-checklists.html">my-checklists webcomp</a>
4444
</li>
45+
<li>
46+
<a href="index-checklist-domi.html">checklist domi webcomp</a>
47+
</li>
4548
</ul>
4649
</div>
4750
</body>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { defineCustomElement } from "vue";
2+
3+
import ChecklistDomiVueComponent from "@/checklist-domi.vue";
4+
5+
// convert into custom element constructor
6+
const ChecklistDetailWebcomponent = defineCustomElement(
7+
ChecklistDomiVueComponent
8+
);
9+
10+
// register
11+
customElements.define(
12+
"checklist-domi",
13+
ChecklistDetailWebcomponent
14+
);
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<template>
2+
<div>
3+
<!-- eslint-disable-next-line vue/no-v-html -->
4+
<div v-html="mucIconsSprite" />
5+
<!-- eslint-disable-next-line vue/no-v-html -->
6+
<div v-html="customIconsSprite" />
7+
<muc-callout>
8+
<template #header>
9+
<p>checklist-domi Webcomponent</p>
10+
</template>
11+
<template #content>
12+
<p>{{ calloutContent }}</p>
13+
</template>
14+
</muc-callout>
15+
</div>
16+
</template>
17+
18+
<script setup lang="ts">
19+
import { MucCallout } from "@muenchen/muc-patternlab-vue";
20+
import customIconsSprite from "@muenchen/muc-patternlab-vue/assets/icons/custom-icons.svg?raw";
21+
import mucIconsSprite from "@muenchen/muc-patternlab-vue/assets/icons/muc-icons.svg?raw";
22+
import { computed } from "vue";
23+
24+
import { FIRSTNAME_DEFAULT } from "@/util/constants";
25+
26+
const { firstName = FIRSTNAME_DEFAULT } = defineProps<{
27+
firstName?: string;
28+
}>();
29+
30+
const calloutContent = computed(() => {
31+
return `Hello ${firstName}`;
32+
});
33+
</script>
34+
35+
<style>
36+
@import url("https://assets.muenchen.de/mde/1.0.10/css/style.css");
37+
@import "@muenchen/muc-patternlab-vue/assets/css/custom-style.css";
38+
@import "@muenchen/muc-patternlab-vue/style.css";
39+
</style>

0 commit comments

Comments
 (0)