wix-style-react
Version:
wix-style-react
110 lines • 4.13 kB
TypeScript
export default Sidebar;
/** A sidebar navigation component */
declare class Sidebar extends React.Component<any, any, any> {
static displayName: string;
static Item: typeof SidebarItem;
static PersistentHeader: typeof SidebarPersistentHeader;
static PersistentFooter: typeof SidebarPersistentFooter;
static BackButton: typeof SidebarBackButton;
static propTypes: {
/** classNames overrides */
classNames: PropTypes.Requireable<string>;
/** The dataHook of the Sidebar */
dataHook: PropTypes.Requireable<string>;
/** Sidebar menu children */
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
/** Sidebar indicator for animating out or in */
isHidden: PropTypes.Requireable<boolean>;
/** Sets the skin of the Sidebar */
skin: PropTypes.Requireable<string>;
};
static defaultProps: {
skin: string;
isHidden: boolean;
};
constructor(props: any);
itemKeyToChildren: {};
itemKeyToParentKey: {};
firstLevelItems: any[];
state: {
persistentTopChildren: never[];
drivenOutChildren: never[];
onScreenChildren: never[];
collapsibleOnScreenChildren: never[];
drivenInChildren: never[];
persistentBottomChildren: never[];
selectedKey: string;
lastSelectedKey: string;
expandedInnerMenu: undefined;
};
_getInnerMenuCollapsibleState: (options: any) => {
collapsibleOnScreenChildren: any;
expandedInnerMenu: undefined;
};
_shouldCollapseInnerMenu: (itemKey: any) => boolean;
_shouldExpandInnerMenu: (parentKey: any, itemKey: any) => boolean;
_navigateTo: (itemKey: any) => void;
sidebarContext: {
itemClicked: (itemKey: any) => void;
backClicked: () => void;
getSelectedKey: () => string;
getSkin: () => any;
getIsMenuExpanded: () => undefined;
};
_getSidebarContext: () => {
itemClicked: (itemKey: any) => void;
backClicked: () => void;
getSelectedKey: () => string;
getSkin: () => any;
getIsMenuExpanded: () => undefined;
};
_getInnerChildSelectedState: (itemKey: any) => {
collapsibleOnScreenChildren: any;
expandedInnerMenu: undefined;
drivenInChildren: any;
selectedKey: any;
lastSelectedKey: any;
} | {
selectedKey: any;
collapsibleOnScreenChildren: any;
expandedInnerMenu: undefined;
};
_getInnerMenuOpenState: (itemKey: any) => {
drivenInChildren: any;
drivenOutChildren: never[];
selectedKey: any;
lastSelectedKey: any;
collapsibleOnScreenChildren: any;
expandedInnerMenu: undefined;
};
_getItemToCloseKey: (itemKey: any) => any;
_getItemToOpenKey: (parentKey: any, itemKey: any) => any;
_getInnerMenuCloseState: (itemKey: any, updateCollapsibleOnlyOnChange: any) => {
selectedKey: any;
lastSelectedKey: any;
drivenInChildren: never[];
drivenOutChildren: never[];
collapsibleOnScreenChildren: any;
expandedInnerMenu: undefined;
};
_getItemWithKey: (item: any, itemKey: any) => any;
_getChildrenWithKeys: (child: any) => any;
_isParent: (itemKey: any) => any;
_isChild: (itemKey: any) => any;
_isAlreadyOpen: (menuToOpen: any) => boolean;
_isAlreadyClosed: (selected: any, menuToClose: any) => boolean;
_selectItem: (itemKey: any) => void;
_openInnerMenu: (itemKey: any) => void;
_closeInnerMenu: (itemKey: any) => void;
UNSAFE_componentWillMount(): void;
UNSAFE_componentWillReceiveProps(props: any): void;
_setInnerMenus(props: any): void;
render(): React.JSX.Element;
}
import React from 'react';
import { SidebarItem } from './SidebarItem';
import { SidebarPersistentHeader } from './SidebarPersistentHeader';
import { SidebarPersistentFooter } from './SidebarPersistentFooter';
import { SidebarBackButton } from './SidebarBackButton';
import PropTypes from 'prop-types';
//# sourceMappingURL=Sidebar.d.ts.map