Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

SideBarClose

SideBarClose requests that a sidebar collapse.

Usage

import { SideBarClose } from "@artisansdk/workbench"

workbench.emit(new SideBarClose({ target: "primary" }))

Payload

type Options = {
    target: "primary" | "secondary"
}

If target is omitted, the event defaults to the primary sidebar.

Behavior

The React Sidebar component listens for this event and collapses the matching sidebar when it is received.