11``` tsx
22import * as menu from " @zag-js/menu"
33import { normalizeProps , useMachine } from " @zag-js/solid"
4- import { createMemo , createUniqueId , For } from " solid-js"
4+ import { createMemo , createSignal , createUniqueId , For } from " solid-js"
5+
6+ const data = {
7+ order: [
8+ { label: " Ascending" , value: " asc" },
9+ { label: " Descending" , value: " desc" },
10+ { label: " None" , value: " none" },
11+ ],
12+ type: [
13+ { label: " Email" , value: " email" },
14+ { label: " Phone" , value: " phone" },
15+ { label: " Address" , value: " address" },
16+ ],
17+ }
518
619export function Menu() {
720 const service = useMachine (menu .machine , { id: createUniqueId () })
@@ -12,7 +25,7 @@ export function Menu() {
1225 const [type, setType] = createSignal ([])
1326
1427 const radios = createMemo (() =>
15- menuOptionData .order .map ((item ) => ({
28+ data .order .map ((item ) => ({
1629 type: " radio" ,
1730 value: item .value ,
1831 label: item .label ,
@@ -23,7 +36,7 @@ export function Menu() {
2336 )
2437
2538 const checkboxes = createMemo (() =>
26- menuOptionData .type .map ((item ) => ({
39+ data .type .map ((item ) => ({
2740 type: " checkbox" ,
2841 value: item .value ,
2942 label: item .label ,
0 commit comments