Skip to content

Commit

Permalink
update examples to use css method
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenyou committed Jun 21, 2024
1 parent 922a09d commit 8e9acf9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
6 changes: 3 additions & 3 deletions examples/vite-app-mill/myapp/src/myapp/index.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ def App(): Unit =
render(
container,
div(
cls := sw(tw.w_screen.h_screen.flex.items_center.justify_center),
cls := tw.w_screen.h_screen.flex.items_center.justify_center.css,
div(
"Scala ❤️ Tailwind",
cls := sw(tw.p_2.text_primary.hover(tw.bg_black.text_white))
cls := tw.p_2.text_primary.hover(tw.bg_black.text_white).css
)
)
)
end App
end App
6 changes: 3 additions & 3 deletions examples/vite-app-sbt/src/main/scala/myapp/index.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ def App(): Unit =
render(
container,
div(
cls := sw(tw.w_screen.h_screen.flex.items_center.justify_center),
cls := tw.w_screen.h_screen.flex.items_center.justify_center.css,
div(
"Scala ❤️ Tailwind",
cls := sw(tw.p_2.text_primary.hover(tw.bg_black.text_white))
cls := tw.p_2.text_primary.hover(tw.bg_black.text_white).css
)
)
)
end App
end App
5 changes: 2 additions & 3 deletions examples/vite-app/src/index.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@ import org.scalajs.dom
import com.raquo.laminar.api.L.*
import scalawind.*


@main
def App(): Unit =
val container = dom.document.getElementById("app")
render(
container,
div(
cls := sw(tw.w_screen.h_screen.flex.items_center.justify_center),
cls := tw.w_screen.h_screen.flex.items_center.justify_center.css,
div(
"Scala ❤️ Tailwind",
cls := sw(tw.p_2.text_primary.hover(tw.bg_black.text_white))
cls := tw.p_2.text_primary.hover(tw.bg_black.text_white).css
)
)
)
Expand Down
4 changes: 2 additions & 2 deletions examples/vite-scalajs-react/src/index.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ def App(): Unit =
.useState(0)
.render((props, count) => {
<.div(
^.cls := sw(tw.w_screen.h_screen.flex.items_center.justify_center),
^.cls := tw.w_screen.h_screen.flex.items_center.justify_center.css,
<.div(
^.cls := sw(tw.p_2.text_primary.hover(tw.bg_black.text_white)),
^.cls := tw.p_2.text_primary.hover(tw.bg_black.text_white).css,
"Scala ❤️ Tailwind"
)
)
Expand Down

0 comments on commit 8e9acf9

Please sign in to comment.