Skip to content

Commit 068b3db

Browse files
committed
Add MenuItemState to control the menu item state
1 parent 97769b3 commit 068b3db

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

markedit.d.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ export type TextRange = {
272272
export type MenuItem = {
273273
title?: string;
274274
action?: () => void;
275+
state?: () => MenuItemState;
275276

276277
/**
277278
* Whether an item is a separator used to logically group other items.
@@ -298,6 +299,20 @@ export type MenuItem = {
298299
children?: MenuItem[];
299300
};
300301

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+
301316
/**
302317
* Represents a location on the screen.
303318
*/

0 commit comments

Comments
 (0)