Skip to content

Commit

Permalink
Merge pull request #38 from nguyenyou/fix/remove-unreachable-case
Browse files Browse the repository at this point in the history
fix: remove unreachable case
  • Loading branch information
nguyenyou authored May 27, 2024
2 parents fdbad8a + 2686658 commit 442f1b1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/dry-masks-brush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"scalawind": patch
---

remove unreachable case
3 changes: 3 additions & 0 deletions examples/vite-app/src/index.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ import org.scalajs.dom
import com.raquo.laminar.api.L.*
import scalawind.*


@main
def App(): Unit =
val container = dom.document.getElementById("app")
val styles: String = tw.w_screen.h_screen.flex.items_center.justify_center
println(styles)
render(
container,
div(
Expand Down
3 changes: 0 additions & 3 deletions packages/scalawind/src/templates/scalawind.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ def swImpl(twStyleExpr: Expr[TwStyle])(using Quotes): Expr[String] = {
val classes = extractClassNames(styles).map(clx => s"{{this}}:$clx")
extractClassNames(inner) ++ classes
{{/each}}
case Apply(Select(inner, "md"), List(mdStyle)) =>
val mdClasses = extractClassNames(mdStyle).map(cls => s"md:$cls")
extractClassNames(inner) ++ mdClasses
case Apply(Ident(name), List(inner)) =>
extractClassNames(inner) :+ name.replace("_", "-")
case Inlined(_, _, inner) =>
Expand Down

0 comments on commit 442f1b1

Please sign in to comment.