Skip to content

Instantly share code, notes, and snippets.

@fponticelli fponticelli/DoomDSL.hx
Last active Mar 29, 2017

Embed
What would you like to do?
button("click me")
.large()
.danger()
.disabled()
button([
Content("click me"),
Large,
Danger,
Disabled
])
button
.with(Content("click me")),
.with(Large),
.with(Danger),
.with(Disabled)
button("click me")
.size(Large)
.intent(Danger)
.disabled(true)
button
.size(Large)
.intent(Danger)
.disabled(true)
.content("click me")
<button size="large" intent="danger" disabled="true">click me</button>
dom('
<button size=Large intent=Danger disabled=true>
click me
</button>
')
input
.type(Text)
.value("some string")
.input(e -> trace(e));
div
.cls("one")
.cls("other")
.cls.when(true, "conditional")
.cls.unless(false, () -> "unlikely") // ??? or use magic lazy conversion?
.children(span.text("here we go"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.