Try out Lion as base for button.

Much easier to customize, though not without its issues:
- Lion give us some stuff to handle validation, forms & input that I haven't looked into
- Slightly different mixin structure, I might be missing out on something
- Properties in extending class cause TypeScript error, but still work
This commit is contained in:
nathan
2021-07-19 11:57:06 -06:00
parent 723ec70009
commit 610d8e1547
4 changed files with 34 additions and 16 deletions

View File

@ -22,7 +22,6 @@ import {et2_IInput, et2_IInputNode, et2_ISubmitListener} from "./et2_core_interf
import {et2_compileLegacyJS} from "./et2_core_legacyJSFunctions";
// fixing circular dependencies by only importing the type (not in compiled .js)
import type {et2_tabbox} from "./et2_widget_tabs";
import {LitElement} from "lit-element";
export interface et2_input {
getInputNode() : HTMLInputElement|HTMLElement;
@ -393,7 +392,7 @@ export class et2_inputWidget extends et2_valueWidget implements et2_IInput, et2_
*/
type Constructor<T = {}> = new (...args: any[]) => T;
export const Et2InputWidget = <T extends Constructor<LitElement>>(superClass: T) => {
export const Et2InputWidget = <T extends Constructor>(superClass: T) => {
class Et2InputWidgetClass extends superClass implements et2_IInput, et2_IInputNode {
label: string = '';