Skip to content

Commit

Permalink
Merge pull request #1374 from gemini-hlsw/vdom-element-monoid
Browse files Browse the repository at this point in the history
Add Monoid instance for VdomElement
  • Loading branch information
rpiaggio authored Dec 11, 2024
2 parents 652f336 + ecc8f39 commit 972595c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/ui/src/main/scala/lucuma/ui/react/givens.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ given Monoid[VdomNode] = new Monoid[VdomNode]:
val empty: VdomNode = EmptyVdom
def combine(x: VdomNode, y: VdomNode): VdomNode = React.Fragment(x, y)

given Monoid[VdomElement] = new Monoid[VdomElement]:
val empty: VdomElement = React.Fragment()
def combine(x: VdomElement, y: VdomElement): VdomElement = React.Fragment(x, y)

given Monoid[TagMod] = new Monoid[TagMod]:
val empty: TagMod = TagMod.empty
def combine(x: TagMod, y: TagMod): TagMod = TagMod(x, y)

0 comments on commit 972595c

Please sign in to comment.