@@ -87,12 +87,7 @@ export const DocSubPageItem = (props: TreeViewNodeProps<Doc>) => {
8787 }
8888 } ;
8989
90- useKeyboardActivation (
91- [ 'Enter' , ' ' ] ,
92- isActive && ! menuOpen ,
93- handleActivate ,
94- true ,
95- ) ;
90+ useKeyboardActivation ( [ 'Enter' ] , isActive && ! menuOpen , handleActivate , true ) ;
9691
9792 const docTitle = doc . title || untitledDocument ;
9893 const hasChildren = ( doc . children ?. length || 0 ) > 0 ;
@@ -110,10 +105,6 @@ export const DocSubPageItem = (props: TreeViewNodeProps<Doc>) => {
110105 aria-selected = { isSelected }
111106 aria-expanded = { hasChildren ? isExpanded : undefined }
112107 $css = { css `
113- .c__tree-view--node {
114- padding : ${ spacingsTokens [ '3xs' ] } ;
115- border-radius : 4px ;
116- }
117108 background-color : ${ menuOpen
118109 ? 'var(--c--theme--colors--greyscale-100)'
119110 : 'var(--c--theme--colors--greyscale-000)' } ;
@@ -138,6 +129,9 @@ export const DocSubPageItem = (props: TreeViewNodeProps<Doc>) => {
138129 background : var (--c--theme--colors--greyscale-100 );
139130 }
140131 }
132+ .row .preview & {
133+ background-color : inherit;
134+ }
141135 ` }
142136 >
143137 < TreeViewItem { ...props } onClick = { handleActivate } >
@@ -183,23 +177,22 @@ export const DocSubPageItem = (props: TreeViewNodeProps<Doc>) => {
183177 ) }
184178 </ Box >
185179 </ BoxButton >
180+ < Box
181+ $direction = "row"
182+ $align = "center"
183+ className = "light-doc-item-actions"
184+ role = "toolbar"
185+ aria-label = { `${ t ( 'Actions for' ) } ${ docTitle } ` }
186+ >
187+ < DocTreeItemActions
188+ doc = { doc }
189+ isOpen = { menuOpen }
190+ onOpenChange = { setMenuOpen }
191+ parentId = { node . data . parentKey }
192+ onCreateSuccess = { afterCreate }
193+ />
194+ </ Box >
186195 </ TreeViewItem >
187-
188- < Box
189- $direction = "row"
190- $align = "center"
191- className = "light-doc-item-actions"
192- role = "toolbar"
193- aria-label = { `${ t ( 'Actions for' ) } ${ docTitle } ` }
194- >
195- < DocTreeItemActions
196- doc = { doc }
197- isOpen = { menuOpen }
198- onOpenChange = { setMenuOpen }
199- parentId = { node . data . parentKey }
200- onCreateSuccess = { afterCreate }
201- />
202- </ Box >
203196 </ Box >
204197 ) ;
205198} ;
0 commit comments