public Item(IComponent component) { InnerElement = Button(_("tss-contextmenu-item")); InnerElement.appendChild(component.Render()); AttachClick(); InnerElement.addEventListener("mouseover", OnItemMouseOver); }
public Item(string text = string.Empty) { _innerComponent = null; InnerElement = Button(_("tss-contextmenu-item", text: text)); AttachClick(); InnerElement.addEventListener("mouseenter", OnItemMouseEnter); InnerElement.addEventListener("mouseleave", OnItemMouseLeave); }
public Item(IComponent component) { if (component is ITextFormating itf && (itf is Button || itf is Link)) { itf.SetTextAlign(TextAlign.Left); } _innerComponent = component.Render(); InnerElement = Div(_("tss-contextmenu-item"), _innerComponent); InnerElement.appendChild(_innerComponent); AttachClick(); InnerElement.addEventListener("mouseenter", OnItemMouseEnter); InnerElement.addEventListener("mouseleave", OnItemMouseLeave); }
public Item(string text = string.Empty) { InnerElement = Button(_("tss-contextmenu-item", text: text)); AttachClick(); InnerElement.addEventListener("mouseover", OnItemMouseOver); }