提交 28951283 编写于 作者: M Matt Bierner

Strict null check checkbox.ts

上级 c2b17260
......@@ -27,8 +27,10 @@
"./vs/base/browser/ui/breadcrumbs/breadcrumbsWidget.ts",
"./vs/base/browser/ui/button/button.ts",
"./vs/base/browser/ui/centered/centeredViewLayout.ts",
"./vs/base/browser/ui/checkbox/checkbox.ts",
"./vs/base/browser/ui/contextview/contextview.ts",
"./vs/base/browser/ui/countBadge/countBadge.ts",
"./vs/base/browser/ui/findinput/findInputCheckboxes.ts",
"./vs/base/browser/ui/grid/grid.ts",
"./vs/base/browser/ui/grid/gridview.ts",
"./vs/base/browser/ui/highlightedlabel/highlightedLabel.ts",
......
......@@ -15,7 +15,7 @@ import { BaseActionItem } from 'vs/base/browser/ui/actionbar/actionbar';
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
export interface ICheckboxOpts extends ICheckboxStyles {
readonly actionClassName: string;
readonly actionClassName?: string;
readonly title: string;
readonly isChecked: boolean;
}
......@@ -92,7 +92,7 @@ export class Checkbox extends Widget {
this.domNode = document.createElement('div');
this.domNode.title = this._opts.title;
this.domNode.className = 'monaco-custom-checkbox ' + this._opts.actionClassName + ' ' + (this._checked ? 'checked' : 'unchecked');
this.domNode.className = 'monaco-custom-checkbox ' + (this._opts.actionClassName || '') + ' ' + (this._checked ? 'checked' : 'unchecked');
this.domNode.tabIndex = 0;
this.domNode.setAttribute('role', 'checkbox');
this.domNode.setAttribute('aria-checked', String(this._checked));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册