Skip to content

Commit

Permalink
Merge pull request #258 from yourssu/feature/tei/ydsoverflow
Browse files Browse the repository at this point in the history
[YDS-#257] YdsText에 overflow 및 maxLines 속성 추가
  • Loading branch information
taeheeL authored Feb 21, 2024
2 parents 39b383d + 7ef0ef7 commit 703db93
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.takeOrElse
import androidx.compose.ui.text.TextLayoutResult
import androidx.compose.ui.text.style.TextOverflow
import com.yourssu.design.system.compose.foundation.LocalYdsContentAlpha
import com.yourssu.design.system.compose.foundation.LocalYdsContentColor
import com.yourssu.design.system.compose.foundation.YdsTextStyle
Expand All @@ -19,6 +20,9 @@ fun YdsText(
color: Color = Color.Unspecified,
onTextLayout: (TextLayoutResult) -> Unit = {},
style: YdsTextStyle = LocalTextStyle.current,
overflow: TextOverflow = TextOverflow.Clip,
maxLines: Int = Int.MAX_VALUE,
minLines: Int = 1,
) {
val textColor = color.takeOrElse {
style.color.takeOrElse {
Expand All @@ -33,6 +37,9 @@ fun YdsText(
modifier = modifier,
style = mergedStyle,
onTextLayout = onTextLayout,
overflow = overflow,
maxLines = maxLines,
minLines = minLines,
)
}

Expand Down
2 changes: 1 addition & 1 deletion version.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
versionName=2.5.5
versionName=2.5.6
#자동 배포를 위해서 버전은 여기 한 군데에서 관리하면 된다

0 comments on commit 703db93

Please sign in to comment.