docs: add menu bar and optimize navigation

This commit is contained in:
unix
2020-04-06 08:56:06 +08:00
parent 565cc8f2b9
commit 73b45cc3e0
94 changed files with 523 additions and 172 deletions

View File

@@ -1,4 +1,5 @@
import React from 'react'
import { Sides } from 'lib/components/sidebar/side-item'
export interface Configs {
onChange?: Function
@@ -6,12 +7,24 @@ export interface Configs {
updateChineseState: Function
sidebarScrollHeight: number
updateSidebarScrollHeight: Function
sides: Sides[]
updateSides: Function
tabbarFixed: boolean
updateTabbarFixed: Function
}
export const defaultConfigs: Configs = {
sidebarScrollHeight: 0,
updateSidebarScrollHeight: () => {},
updateChineseState: () => {},
sides: [],
updateSides: () => {},
tabbarFixed: false,
updateTabbarFixed: () => {},
}
export const ConfigContext = React.createContext<Configs>(defaultConfigs)