We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 97769b3 commit 068b3dbCopy full SHA for 068b3db
markedit.d.ts
@@ -272,6 +272,7 @@ export type TextRange = {
272
export type MenuItem = {
273
title?: string;
274
action?: () => void;
275
+ state?: () => MenuItemState;
276
277
/**
278
* Whether an item is a separator used to logically group other items.
@@ -298,6 +299,20 @@ export type MenuItem = {
298
299
children?: MenuItem[];
300
};
301
302
+/**
303
+ * Represents the state of a menu item.
304
+ */
305
+export type MenuItemState = {
306
+ /**
307
+ * Whether enabled; defaults to true.
308
309
+ isEnabled?: boolean;
310
311
+ * Whether selected; defaults to false.
312
313
+ isSelected?: boolean;
314
+};
315
+
316
317
* Represents a location on the screen.
318
*/
0 commit comments