@kui-shell/plugin-client-common
Version:
Kui plugin that offers stylesheets
39 lines (38 loc) • 1.41 kB
TypeScript
import React from 'react';
import { PageSidebarProps } from '@patternfly/react-core/dist/esm/components/Page/PageSidebar';
import CommonProps from './props/Common';
import BrandingProps from './props/Branding';
import GuidebookProps from './props/Guidebooks';
import '../../../web/scss/components/Sidebar/_index.scss';
type Props = Pick<CommonProps, 'noTopTabs'> & BrandingProps & GuidebookProps & {
/** unfurled? */
isOpen: boolean;
/** visually indicate which nav item is active? */
indicateActiveItem?: boolean;
/** toggle open state */
toggleOpen(): void;
};
type State = Pick<PageSidebarProps, 'nav'> & {
/** in noTopTabs mode, we indicate selected guidebook in the NavItem below */
currentGuidebook?: string;
};
export default class Sidebar extends React.PureComponent<Props, State> {
private readonly cleaners;
constructor(props: Props);
private get currentGuidebook();
componentWillUnmount(): void;
/** e.g. product version */
private footer;
/** User has clicked to select a given Guidebook */
private onSelect;
/** Render the menu structure of the sidebar */
private menu;
/**
* This is the entirety of the contents of the sidebar. The method
* is named `nav` because that is what the PatternFly component
* calls the corresponding property.
*/
private nav;
render(): JSX.Element;
}
export {};