Skip to content

Commit

Permalink
Add component CellUniversalFixedHeight
Browse files Browse the repository at this point in the history
  • Loading branch information
abdrasulov committed Feb 5, 2024
1 parent 439e80b commit 75b9727
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.ColumnScope
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.RowScope
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.Divider
Expand Down Expand Up @@ -44,6 +45,30 @@ fun CellUniversal(
}
}

@Composable
fun CellUniversalFixedHeight(
borderTop: Boolean = true,
height: Dp,
content: @Composable() (RowScope.() -> Unit),
) {
Box {
if (borderTop) {
Divider(
thickness = 1.dp,
color = ComposeAppTheme.colors.steel10,
modifier = Modifier.align(Alignment.TopCenter)
)
}

Row(
modifier = Modifier.height(height),
horizontalArrangement = Arrangement.Start,
verticalAlignment = Alignment.CenterVertically,
content = content
)
}
}

@Composable
fun SectionUniversalLawrence(
content: @Composable() (ColumnScope.() -> Unit),
Expand Down

0 comments on commit 75b9727

Please sign in to comment.