Skip to content

Commit

Permalink
refactor: RoundedImage 함수에 border 인자 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
tmdgh1592 committed Jun 5, 2024
1 parent a8f20f7 commit b406031
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.droidknights.app.core.designsystem.component

import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.aspectRatio
import androidx.compose.foundation.shape.RoundedCornerShape
Expand All @@ -15,15 +16,17 @@ fun RoundedImage(
imageRes: Int,
onClick: () -> Unit = {},
roundSize: Dp = 16.dp,
border: BorderStroke? = null,
) {
Surface(
shape = RoundedCornerShape(roundSize),
onClick = onClick,
shape = RoundedCornerShape(roundSize),
border = border,
) {
Image(
painter = painterResource(id = imageRes),
contentDescription = null,
modifier = Modifier.aspectRatio(1f)
modifier = Modifier.aspectRatio(1f),
)
}
}

0 comments on commit b406031

Please sign in to comment.