Skip to content

Commit aa5311f

Browse files
fix: change to customclasses, add inspector
1 parent 90c5add commit aa5311f

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

examples/vite-svelte/src/App.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727

2828
<h1 class="animate-bounce">Hello Typescript!</h1>
2929

30+
<h2 class="text-lg font-semibold text-orange-600">Use shift+ctrl for the inspector</h2>
31+
3032
<br/>
3133

3234
<div class:bg-red-400={red}>BG Color should change</div>
@@ -46,7 +48,7 @@
4648

4749
<Footer />
4850
<Footer foo={true} name=Footer2 />
49-
<Footer customclass={"bg-blue-500"} name=Footer3 />
51+
<Footer customclasses={"bg-blue-500 text-xl"} name=Footer3 />
5052

5153

5254
<style>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script lang="ts">
2-
const { foo = false, customclass = "", name = "Footer" } = $props()
2+
const { foo = false, customclasses = "", name = "Footer" } = $props()
33
</script>
44

55
<footer>
6-
<div class="bar {customclass}" class:foo>{name}</div>
6+
<div class="bar {customclasses}" class:foo>{name}</div>
77
</footer>

examples/vite-svelte/vite.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ import { defineConfig } from 'vite'
66
export default defineConfig({
77
plugins: [
88
UnoCSS(),
9-
svelte(),
9+
svelte({
10+
inspector: {
11+
toggleKeyCombo: 'control-shift',
12+
showToggleButton: 'always',
13+
toggleButtonPos: 'bottom-right',
14+
},
15+
}),
1016
],
1117
})

0 commit comments

Comments
 (0)