Skip to content

Commit

Permalink
1) Make all WorksGrid items fill the same size;
Browse files Browse the repository at this point in the history
  • Loading branch information
ItamiOMW committed Mar 9, 2024
1 parent 58147e4 commit 96ed02d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ fun WorksSection() {
modifier = WorkItemsGridStyle.toModifier()
) {
Work.entries.forEach {
WorkItem(work = it)
WorkItem(
work = it,
modifier = Modifier.flex(1)
)
}
MoreIsYetToCome()
}
Expand All @@ -55,8 +58,7 @@ private fun MoreIsYetToCome() {
val colorPalette = ColorMode.current.toPalette()
Box(
modifier = Modifier
.fillMaxSize()
.background(colorPalette.overlay)
.backgroundColor(colorPalette.overlay)
.borderRadius(30.px),
contentAlignment = Alignment.Center
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@ package com.itami.itami_mobile.components.sections.works.components

import com.varabyte.kobweb.compose.ui.Modifier
import com.varabyte.kobweb.compose.ui.modifiers.gap
import com.varabyte.kobweb.compose.ui.modifiers.gridAutoRows
import com.varabyte.kobweb.compose.ui.modifiers.margin
import com.varabyte.kobweb.silk.components.style.ComponentStyle
import com.varabyte.kobweb.silk.components.style.breakpoint.Breakpoint
import org.jetbrains.compose.web.css.cssRem
import org.jetbrains.compose.web.css.fr

val WorkItemsGridStyle by ComponentStyle {
base {
Modifier
.gap(2.cssRem)
.margin(top = 4.75.cssRem)
.gridAutoRows { size(1.fr) }
}
Breakpoint.ZERO {
Modifier
Expand Down

0 comments on commit 96ed02d

Please sign in to comment.