Skip to content

Commit

Permalink
Merge pull request #44 from LouisCAD/patch-1
Browse files Browse the repository at this point in the history
Remove unnecessary braces on apply call
  • Loading branch information
Leonya authored Mar 28, 2018
2 parents b33be7c + b87712e commit 2de165b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kotlin-styled/src/main/kotlin/styled/StyledTags.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import kotlinx.html.attributes.*
import react.*

inline fun <T : Tag> RBuilder.styledTag(block: StyledDOMBuilder<T>.() -> Unit, noinline factory: (TagConsumer<Unit>) -> T) =
child(StyledDOMBuilder(factory).apply { block() }.create())
child(StyledDOMBuilder(factory).apply(block).create())


inline fun RBuilder.styledA(href: String? = null, target: String? = null, block: StyledDOMBuilder<A>.() -> Unit) = styledTag(block) { A(attributesMapOf("href", href, "target", target), it) }
Expand Down

0 comments on commit 2de165b

Please sign in to comment.