๐โโ๏ธ @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.
- Signature:
register(definition: ITabActionConfig)
- Returns:
Promise<IDisposable>
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>
}