AddMenu.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import Page from "./Page.js";
  2. import Elem from "../Elem.js";
  3. export default class AddMenu extends Page{
  4. constructor(){
  5. super("AddMenu", ["back-home"]);
  6. this.render();
  7. }
  8. render(closeSvg){
  9. new Elem("button")
  10. .text("New Transaction")
  11. .addClass("button")
  12. .onclick(()=>{changePage("createTransaction")})
  13. .focus()
  14. .appendTo(this.container);
  15. new Elem("button")
  16. .text("New Income")
  17. .addClass("button")
  18. .onclick(()=>{changePage("createIncome")})
  19. .appendTo(this.container);
  20. new Elem("button")
  21. .text("New Bill")
  22. .addClass("button")
  23. .onclick(()=>{changePage("createBill")})
  24. .appendTo(this.container);
  25. new Elem("button")
  26. .text("New Allowance")
  27. .addClass("button")
  28. .onclick(()=>{changePage("createAllowance")})
  29. .appendTo(this.container);
  30. new Elem("button")
  31. .text("New Account")
  32. .addClass("button")
  33. .onclick(()=>{changePage("createAccount")})
  34. .appendTo(this.container);
  35. }
  36. }