Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
self.output = output_widget
self.session = session
self.modes = [
("replace", icon_replace, ReplaceMode),
("add", icon_or, OrMode),
("and", icon_and, AndMode),
("xor", icon_xor, XorMode),
("remove", icon_andnot, AndNotMode),
]
items = []
for mode in self.modes:
item = v.ListItem(children=[v.ListItemAction(children=[mode[1]]),
v.ListItemTitle(children=[mode[0]])])
items.append(item)
for item in items:
item.on_event('click', self._sync_state_from_ui)
mylist = v.List(children=items)
self.main = v.Btn(icon=True,
children=[self.modes[0][1]], v_on="menu.on")
super().__init__(
v_slots=[{
'name': 'activator',
'variable': 'menu',
'children': self.main
}],