Skip to content

Commit 7fc0b00

Browse files
committed
Add gridTemplateAreas#apply(...)
1 parent ec0f8dd commit 7fc0b00

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

core/src/main/scala/japgolly/scalajs/react/vdom/HtmlStyles.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2514,7 +2514,9 @@ trait HtmlStyles {
25142514
* * . - a period signifies an empty grid cell
25152515
* * none - no grid areas are defined
25162516
*/
2517-
final def gridTemplateAreas = Style[String]("gridTemplateAreas")
2517+
final object gridTemplateAreas extends Style[String]("gridTemplateAreas") {
2518+
def apply(rows: String*) = this := rows.mkString("'", "' '", "'")
2519+
}
25182520

25192521
/**
25202522
* Specifies the size of the grid lines. You can think of it like setting the

doc/changelog/1.4.2.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
* Add helper methods to the `autoComplete` attribute, eg. `^.autoComplete.currentPassword`
1717
* `minLength` and `maxLength` now only accept ints
1818
* add `pattern` attribute
19+
* `gridTemplateAreas` has a new optional syntax: `^.gridTemplateAreas("a a", "b c", "b c")`
20+
which is equivalent to `^.gridTemplateAreas := "'a a' 'b c' 'b c'"`
1921

2022
* Dependency upgrades
2123
* Cats 1.6.0

0 commit comments

Comments
 (0)