import React from "react" ; import { FolderSidebar2 } from "../../../../apps/repository/js/folders/FolderSidebar2" ; import { TagDescriptor } from "polar-shared/src/tags/TagDescriptors" ; import { ITagsContext , PersistenceContext , TagsContext } from "../../../../apps/repository/js/persistence_layer/PersistenceLayerApp" ; function createTagDescriptor ( tag , count ) { return { id : tag , label : tag , count , members : [ ] } ; } const tagDescriptors = [ createTagDescriptor ( 'linux' , 101 ) , createTagDescriptor ( 'microsoft' , 200 ) , createTagDescriptor ( '/compsci/linux' , 20 ) , createTagDescriptor ( '/compsci/google' , 100 ) , createTagDescriptor ( '/compsci/stanford/cs101' , 220 ) , createTagDescriptor ( '/compsci/stanford/cs102' , 215 ) , ] ; const FolderSidebarDemo = ( ) => { return ( < FolderSidebar2 />); } ; const tagsContext = { tagsProvider : ( ) => tagDescriptors } ; export const MUITreeViewDemo = ( ) => { return ( < div > < TagsContext . Provider value = { tagsContext } > < FolderSidebarDemo /> < /TagsContext.Provider> < /div>); } ;