Skip to content

Commit

Permalink
add doc for important modifier
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenyou committed May 27, 2024
1 parent f7519e4 commit 9897017
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,12 @@ npx degit nguyenyou/scalawind/examples/vite-app my-scalawind-app
To specify a class to be important, you can wrap it inside the `tw.important()` or `tw.i()` modifier.

```scala
button(cls := sw(tw.text_red_500.important(tw.text_black)), "Click me")
button(cls := sw(tw.text_red_500.important(tw.text_black).hover(tw.important(tw.text_blue_700))), "Click me")
```

The output will be:
```
<button class="text-red-500 !text-black hover:!text-blue-700">Click me</button>
```


Expand Down

0 comments on commit 9897017

Please sign in to comment.