Path: blob/main/src/vs/workbench/services/banner/browser/bannerService.ts
3296 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import { MarkdownString } from '../../../../base/common/htmlContent.js';6import { URI } from '../../../../base/common/uri.js';7import { createDecorator } from '../../../../platform/instantiation/common/instantiation.js';8import { ILinkDescriptor } from '../../../../platform/opener/browser/link.js';9import { ThemeIcon } from '../../../../base/common/themables.js';1011export interface IBannerItem {12readonly id: string;13readonly icon: ThemeIcon | URI | undefined;14readonly message: string | MarkdownString;15readonly actions?: ILinkDescriptor[];16readonly ariaLabel?: string;17readonly onClose?: () => void;18readonly closeLabel?: string;19}2021export const IBannerService = createDecorator<IBannerService>('bannerService');2223export interface IBannerService {24readonly _serviceBrand: undefined;2526focus(): void;27focusNextAction(): void;28focusPreviousAction(): void;29hide(id: string): void;30show(item: IBannerItem): void;31}323334