mirror of
https://github.com/zhigang1992/react.git
synced 2026-04-24 04:15:54 +08:00
docs: add menu bar and optimize navigation
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user