package org.genericsystem.reactor.gs;

import java.util.function.Consumer;

import org.genericsystem.reactor.HtmlDomNode;
import org.genericsystem.reactor.HtmlDomNode.ActionHtmlNode;
import org.genericsystem.reactor.ReactorStatics;
import org.genericsystem.reactor.model.GenericModel;

public class GSModalButton extends GSTag {

	public GSModalButton(GSTag parent, GSSection gSection) {
		super(parent, "button");
		bindAction(model -> {
			gSection.getProperty(ReactorStatics.DISPLAY, model).setValue("flex");
		});
	}

	public void bindAction(Consumer<GenericModel> consumer) {
		addActionBinding(ActionHtmlNode::getActionProperty, consumer);
	}

	@Override
	protected HtmlDomNode createNode(String parentId) {
		return new ActionHtmlNode(parentId);
	}

}

@@ -43,245 +43,99 @@
 ort 
-java.util.function.Consumer;%0A%0Aimport org.genericsystem.reactor.HtmlDomNode;%0Aimport org.genericsystem.reactor.HtmlDomNode.ActionHtmlNode;%0Aimport org.genericsystem.reactor.ReactorStatics;%0Aimport org.genericsystem.reactor.model.GenericModel
+org.genericsystem.reactor.ReactorStatics;%0Aimport org.genericsystem.reactor.gstag.HtmlButton
 ;%0A%0Ap
@@ -168,21 +168,26 @@
 extends 
-GSTag
+HtmlButton
  %7B%0A%0A%09pub
@@ -258,18 +258,8 @@
 rent
-, %22button%22
 );%0A%09
@@ -283,13 +283,8 @@
  -%3E 
-%7B%0A%09%09%09
 gSec
@@ -351,253 +351,12 @@
 ex%22)
-;%0A%09%09%7D);%0A%09%7D%0A%0A%09public void bindAction(Consumer%3CGenericModel%3E consumer) %7B%0A%09%09addActionBinding(ActionHtmlNode::getActionProperty, consumer);%0A%09%7D%0A%0A%09@Override%0A%09protected HtmlDomNode createNode(String parentId) %7B%0A%09%09return new ActionHtmlNode(parentId);%0A%09%7D%0A
+);%0A%09%7D
 %0A%7D%0A

Make GSModalButton extend HtmlButton rather than GSTag