@@ -11,8 +11,8 @@ description: A hierarchical list of items where nested items can be expanded and
1111
1212``` jsx  live drafts
1313< Box sx= {{maxWidth:  400 }}> 
14-   < nav aria- label= " File navigation " > 
15-     < TreeView aria- label= " File navigation " > 
14+   < nav aria- label= " Files " > 
15+     < TreeView aria- label= " Files " > 
1616      < TreeView .Item > 
1717        < TreeView .LeadingVisual > 
1818          < TreeView .DirectoryIcon  / > 
@@ -57,8 +57,8 @@ description: A hierarchical list of items where nested items can be expanded and
5757
5858``` jsx  live drafts
5959< Box sx= {{maxWidth:  400 }}> 
60-   < nav aria- label= " File navigation " > 
61-     < TreeView aria- label= " File navigation " > 
60+   < nav aria- label= " Files " > 
61+     < TreeView aria- label= " Files " > 
6262      < TreeView .LinkItem  href= " #" > 
6363        < TreeView .LeadingVisual > 
6464          < TreeView .DirectoryIcon  / > 
@@ -113,8 +113,8 @@ function ControlledTreeView() {
113113  return  (
114114    < Box sx= {{display:  ' grid' :  2 , maxWidth:  400 }}> 
115115      < Button onClick= {() =>  setExpanded (! expanded)}> {expanded ?  ' Collapse' :  ' Expand' < / Button> 
116-       < nav aria- label= " File navigation " > 
117-         < TreeView aria- label= " File navigation " > 
116+       < nav aria- label= " Files " > 
117+         < TreeView aria- label= " Files " > 
118118          < TreeView .Item  expanded= {expanded} onExpandedChange= {setExpanded}> 
119119            src
120120            < TreeView .SubTree > 
@@ -139,8 +139,8 @@ To render stateful visuals, pass a render function to `TreeView.LeadingVisual` o
139139
140140``` jsx  live drafts
141141< Box sx= {{maxWidth:  400 }}> 
142-   < nav aria- label= " File navigation " > 
143-     < TreeView aria- label= " File navigation " > 
142+   < nav aria- label= " Files " > 
143+     < TreeView aria- label= " Files " > 
144144      < TreeView .Item > 
145145        < TreeView .LeadingVisual > 
146146          {({isExpanded}) =>  (isExpanded ?  < FileDirectoryOpenFillIcon / >  :  < FileDirectoryFillIcon / > )}
@@ -162,8 +162,8 @@ Since stateful directory icons are a common use case for TreeView, we provide a
162162
163163``` jsx  live drafts
164164< Box sx= {{maxWidth:  400 }}> 
165-   < nav aria- label= " File navigation " > 
166-     < TreeView aria- label= " File navigation " > 
165+   < nav aria- label= " Files " > 
166+     < TreeView aria- label= " Files " > 
167167      < TreeView .Item > 
168168        < TreeView .LeadingVisual > 
169169          < TreeView .DirectoryIcon  / > 
@@ -272,6 +272,42 @@ See [Storybook](https://primer.style/react/storybook?path=/story/components-tree
272272  { /*  <PropsTableSxRow /> */ } 
273273</PropsTable >
274274
275+ ### TreeView.LeadingVisual  
276+ 
277+ <PropsTable >
278+   <PropsTableRow 
279+     name = " children" 
280+     type = { ` | React.ReactNode 
281+ | (props: {isExpanded: boolean}) => React.ReactNode ` } 
282+   />
283+   <PropsTableRow 
284+     name = " label" 
285+     type = " string" 
286+     description = " Provide an accessible label for the leading visual. This is not necessary for decorative visuals" 
287+   />
288+   { /*  <PropsTableSxRow /> */ } 
289+ </PropsTable >
290+ 
291+ ### TreeView.TrailingVisual  
292+ 
293+ <PropsTable >
294+   <PropsTableRow 
295+     name = " children" 
296+     type = { ` | React.ReactNode 
297+ | (props: {isExpanded: boolean}) => React.ReactNode ` } 
298+   />
299+   <PropsTableRow 
300+     name = " label" 
301+     type = " string" 
302+     description = " Provide an accessible label for the trailing visual. This is not necessary for decorative visuals" 
303+   />
304+   { /*  <PropsTableSxRow /> */ } 
305+ </PropsTable >
306+ 
307+ ### TreeView.DirectoryIcon  
308+ 
309+ <PropsTable >{ /*  <PropsTableSxRow /> */ } </PropsTable >
310+ 
275311### TreeView.SubTree  
276312
277313<PropsTable >
@@ -307,45 +343,38 @@ See [Storybook](https://primer.style/react/storybook?path=/story/components-tree
307343      </>
308344    } 
309345  />
310-   { /*  <PropsTableSxRow /> */ } 
311- </PropsTable >
312- 
313- ### TreeView.LeadingVisual  
314- 
315- <PropsTable >
316346  <PropsTableRow 
317-     name = " children " 
318-     type = { ` | React.ReactNode 
319- | (props: {isExpanded: boolean}) => React.ReactNode ` } 
347+     name = " count " 
348+     type = " number " 
349+      description = " The number of items expected to be in the subtree. When in the loading state, the subtree will render a skeleton loading placeholder with the specified count of items " 
320350  />
321-   <PropsTableRow 
322-     name = " label" 
323-     type = " string" 
324-     description = " Provide an accessible label for the leading visual. This is not necessary for decorative visuals" 
325-   />
326-   { /*  <PropsTableSxRow /> */ } 
351+   <PropsTableSxRow  />
327352</PropsTable >
328353
329- ### TreeView.TrailingVisual   
354+ ### TreeView.ErrorDialog   
330355
331356<PropsTable >
332357  <PropsTableRow 
333358    name = " children" 
334-     type = { ` | React.ReactNode 
335- | (props: {isExpanded: boolean}) => React.ReactNode ` } 
359+     type = " React.ReactNode" 
360+     required 
361+     description = " The content of the dialog. This is usually a message explaining the error." 
336362  />
337363  <PropsTableRow 
338-     name = " label " 
364+     name = " title " 
339365    type = " string" 
340-     description = " Provide an accessible label for the trailing visual. This is not necessary for decorative visuals" 
366+     defaultValue = " 'Error'" 
367+     description = " The title of the dialog. This is usually a short description of the error." 
368+   />
369+   <PropsTableRow 
370+     name = " onRetry" 
371+     type = " () => void" 
372+     description = " Event handler called when the user clicks the retry button." 
341373  />
374+   <PropsTableRow  name = " onDismiss" type = " () => void" description = " Event handler called when the dialog is dismissed." 
342375  { /*  <PropsTableSxRow /> */ } 
343376</PropsTable >
344377
345- ### TreeView.DirectoryIcon  
346- 
347- <PropsTable >{ /*  <PropsTableSxRow /> */ } </PropsTable >
348- 
349378## Status  
350379
351380<ComponentChecklist 
0 commit comments