Skip to content
On this page

๐Ÿƒโ€โ™‚๏ธ @bridge/tab-actions

Module that allows access to bridge.'s tab action system. View Source Code

js
import { ... } from '@bridge/tab-actions'

โšก Functions

addTabActions

The addTabActions function adds the default tab actions for the specific file tab.

  • Signature: addTabActions(tab: any)
  • Returns: Promise<void>
js
TODO

register

The register function registers a new tab action.

js
TODO

registerPreview

The register function registers a new tab preview.

  • Signature: registerPreview(definition: ITabPreviewConfig)
  • Returns: Promise<IDisposable>
js
TODO

๐Ÿ“Ÿ Interfaces

ITabActionConfig

js
export interface ITabActionConfig {
	icon: string
	name: string
	trigger(tab: FileTab): Promise<void> | void
	isFor(tab: FileTab): Promise<boolean> | boolean
	isDisabled?: (tab: FileTab) => boolean
}

ITabPreviewConfig

js
export interface ITabPreviewConfig {
	name: string
	fileType: string
	createPreview(tabSystem: TabSystem, tab: FileTab): Promise<Tab | undefined>
}

Released under the GPL-3.0 License.