Add an enable/disable button to the context menu

Hello,
I want to add an enable/disable button to the context menu that appears whenever an element is selected. Clicking the button toggles the enabled status of the element. How can it be done?
Thanks
Screenshot%20from%202019-09-17%2009-33-46

Regarding the context pad, please refer to the existing example.