File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
packages/docs/src/components/home Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -68,9 +68,12 @@ const demos = [
6868] ;
6969
7070export const DemoGrid : FC = ( ) => {
71- const [ selectedDemo , setSelectedDemo ] = useState ( 0 ) ;
71+ const [ selectedDemo , setSelectedDemo ] = useState ( ( ) => {
72+ const search = new URLSearchParams ( document . location . search ) ;
73+ return search . has ( "demo" ) ? parseInt ( search . get ( "demo" ) , 10 ) : 0 ;
74+ } ) ;
7275 return (
73- < div className = { styles . container } >
76+ < div className = { styles . container } id = "demogrid" >
7477 < DemoBox
7578 initialStory = { demos [ selectedDemo ] ?. story }
7679 tags = { [ "homepage" ] }
Original file line number Diff line number Diff line change @@ -19,6 +19,11 @@ library you want. The library automatically provides the necessary
1919aria tags to emulate a nested tree structure, so that accessibility
2020requirements are met despite the flat structure.
2121
22+ Dive into [ the Get Started page] ( https://headless-tree.lukasbach.com/getstarted )
23+ to find out how to use Headless Tree, or have a look at
24+ [ the samples on the Headless Tree Homepage] ( https://headless-tree.lukasbach.com/#demogrid )
25+ to get an idea of what you can do with it.
26+
2227> [ !TIP]
2328> Headless Tree is now available as Beta! The library is mostly stable and
2429> production ready, and will be generally released within two months, once
You can’t perform that action at this time.
0 commit comments