File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
examples/nuxt-ts/components Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 11<script setup lang="ts">
22import { highlightState } from " @zag-js/stringify-state"
3- import { isRef } from " vue "
3+ import type { Service } from " @zag-js/core "
44
55const props = defineProps <{
6- state: any
6+ state: Service < any >
77 label? : string
88 omit? : string []
99}>()
1010
11- const state = isRef (props .state ) ? props .state .value : props .state
11+ const obj = computed (() => {
12+ const service = props .state
13+ return {
14+ state: service .state .get (),
15+ event: service .event .current (),
16+ }
17+ })
1218 </script >
1319
1420<template >
1521 <div class =" viz" >
1622 <pre >
1723 <details open >
1824 <summary > {{props.label || "Visualizer"}} </summary >
19- <div v-html =" highlightState(state , props.omit)" ></div >
25+ <div v-html =" highlightState(obj , props.omit)" ></div >
2026 </details >
2127 </pre >
2228 </div >
You can’t perform that action at this time.
0 commit comments