UNPKG

@studiocms/ui

Version:

The UI library for StudioCMS. Includes the layouts & components we use to build StudioCMS.

77 lines (76 loc) 2.63 kB
declare class SingleSidebarHelper { private sidebar; private sidebarToggle?; /** * A helper to manage the sidebar with. * @param toggleID The ID of the element that should toggle the sidebar. */ constructor(toggleID?: string); /** * A helper function register an element which should toggle the sidebar. * @param elementID The ID of the element that should toggle the sidebar. */ toggleSidebarOnClick: (elementID: string) => void; /** * A helper function to hide the sidebar when an element is clicked. * @param elementID The ID of the element that should hide the sidebar. */ hideSidebarOnClick: (elementID: string) => void; /** * A helper function to show the sidebar when an element is clicked. * @param elementID The ID of the element that should show the sidebar. */ showSidebarOnClick: (elementID: string) => void; /** * A function to hide the sidebar. */ hideSidebar: () => void; /** * A function to show the sidebar. */ showSidebar: () => void; } declare class DoubleSidebarHelper { private sidebarsContainer; /** * A helper to manage the double sidebar with. */ constructor(); /** * A helper function to hide the sidebar when an element is clicked. * @param elementID The ID of the element that should hide the sidebar. */ hideSidebarOnClick: (elementID: string) => void; /** * A helper function to show the outer sidebar when an element is clicked. * @param elementID The ID of the element that should show the outer sidebar. */ showOuterOnClick: (elementID: string) => void; /** * A helper function to show the inner sidebar when an element is clicked. * @param elementID The ID of the element that should show the inner sidebar. */ showInnerOnClick: (elementID: string) => void; /** * A helper function to toggle between the outer and inner sidebar when an element is clicked. * @param elementID The ID of the element that should toggle the sidebar view. */ toggleStateOnClick: (elementID: string) => void; /** * A function to show the inner sidebar. */ showInnerSidebar: () => void; /** * A function to show the outer sidebar. */ showOuterSidebar: () => void; /** * A function to toggle between the outer and inner sidebar. */ toggleSidebarState: () => void; /** * A function to hide the sidebar altogether. */ hideSidebar: () => void; } export { SingleSidebarHelper, DoubleSidebarHelper };