mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-25 09:06:21 +01:00
23 lines
723 B
TypeScript
23 lines
723 B
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
import { reset } from 'vs/base/browser/dom';
|
|
import { renderCodiconsAsElement } from 'vs/base/browser/codicons';
|
|
|
|
export class CodiconLabel {
|
|
|
|
constructor(
|
|
private readonly _container: HTMLElement
|
|
) { }
|
|
|
|
set text(text: string) {
|
|
reset(this._container, ...renderCodiconsAsElement(text ?? ''));
|
|
}
|
|
|
|
set title(title: string) {
|
|
this._container.title = title;
|
|
}
|
|
}
|