Closed
Description
For example, https://ant.design/components/popconfirm/
// confirm, cancel are functions
<Popconfirm title="Are you sure delete this task?" onConfirm={confirm} onCancel={cancel} okText="Yes" cancelText="No">
<a href="#">Delete</a>
</Popconfirm>
What I expect:
class Popconfirm(title: String, okText: String, cancelText: String, onConfirm: Event => Unit, onCancel: Event => Unit) extend SomeTrait {
@some_anno override def render(body: Element): Element = ???
}
here render
is the function used in macros.
But this test case(https://github.com/ThoughtWorksInc/Binding.scala/blob/11.0.x/fxml/.js/src/test/scala/com/thoughtworks/binding/DateSpec.scala) shows that <Date></Date>
is Binding[Date]
or another type relating to Date
. It seems @fxml
is not suitable for customizing tags to create something like Ant Design.
In #4 (comment) ,
there are tricks to make custom tags work, but it is without any inner html (eg. <a href="#">Delete</a>
).
Metadata
Metadata
Assignees
Labels
No labels