File tree 3 files changed +9
-9
lines changed
3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -11,10 +11,10 @@ export default function Page() {
11
11
const rootService = useMachine ( navigationMenu . machine , { id : useId ( ) } )
12
12
const rootMenu = navigationMenu . connect ( rootService , normalizeProps )
13
13
14
- const productService = useMachine ( navigationMenu . machine , { id : useId ( ) , value : "extensibility" } )
14
+ const productService = useMachine ( navigationMenu . machine , { id : useId ( ) , defaultValue : "extensibility" } )
15
15
const productSubmenu = navigationMenu . connect ( productService , normalizeProps )
16
16
17
- const companyService = useMachine ( navigationMenu . machine , { id : useId ( ) , value : "customers" } )
17
+ const companyService = useMachine ( navigationMenu . machine , { id : useId ( ) , defaultValue : "customers" } )
18
18
const companySubmenu = navigationMenu . connect ( companyService , normalizeProps )
19
19
20
20
const renderLinks = ( menu : typeof rootMenu , opts : { value : string ; items : string [ ] } ) => {
Original file line number Diff line number Diff line change @@ -60,8 +60,6 @@ export const machine = createMachine({
60
60
triggerNode : bindable < HTMLElement | null > ( ( ) => ( {
61
61
defaultValue : null ,
62
62
} ) ) ,
63
-
64
- // nesting
65
63
}
66
64
} ,
67
65
@@ -93,9 +91,8 @@ export const machine = createMachine({
93
91
94
92
exit : [ "cleanupObservers" , "cleanupAutoResetRef" ] ,
95
93
96
- initialState ( { prop } ) {
97
- const value = prop ( "value" ) || prop ( "defaultValue" )
98
- return value ? "open" : "closed"
94
+ initialState ( ) {
95
+ return "closed"
99
96
} ,
100
97
101
98
on : {
Original file line number Diff line number Diff line change 33
33
}
34
34
35
35
[data-scope = "navigation-menu" ][data-part = "trigger" ] {
36
+ display : flex;
37
+ align-items : center;
38
+ justify-content : center;
36
39
border : 0 ;
37
40
background : transparent;
38
41
font-size : inherit;
39
42
gap : 4px ;
40
43
padding : 10px 16px ;
41
44
font-weight : bold;
42
45
43
- & > svg {
46
+ & svg {
44
47
transition : rotate 200ms ease;
45
48
width : 14px ;
46
49
height : 14px ;
47
50
}
48
51
49
- & [data-state = "open" ] > svg {
52
+ & [data-state = "open" ] svg {
50
53
rotate : -180deg ;
51
54
}
52
55
You can’t perform that action at this time.
0 commit comments