@reginaldo-marinho/rucula-js
Version:
Crie telas em Minutos! 🚀
16 lines (14 loc) • 420 B
text/typescript
import { button } from "../entities/form/button";
export class ElementBase{
protected p:string
constructor(p:string) {
this.p = p
}
element!:HTMLButtonElement|HTMLAnchorElement;
addDataIdAttribute(button:button){
this.element.setAttribute("id",`${this.p}${button.target}`);
}
addColor(color?:string){
if (color)this.element!.style.color = color;
}
}