The Dock provider to register.
A promise that resolves with a DockProviderRegistration object once the Dock provider is successfully registered. This contains the client API version, Workspace Version and a function to update the Dock provider configuration.
An error if the Dock provider configuration contains buttons with duplicate ids. If no ids are specified, the buttons will be assigned ids automatically.
import { Dock, type DockProvider } from '@openfin/workspace';
const provider: DockProvider = {
id: 'provider-id',
title: 'Sample Dock',
icon: 'https://www.openfin.co/favicon-32x32.png',
buttons: [
{
tooltip: 'Sample Button 1',
iconUrl: 'https://www.openfin.co/favicon-32x32.png',
action: {
id: 'sampleButton1'
}
}
]
};
await Dock.register(provider)
await Dock.show()
API function to register a Dock provider.