Skip to content

Commit

Permalink
feat: ContentAlpha 추가 (#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
cometj03 authored Jan 15, 2024
1 parent 53a7a5e commit 4811d76
Show file tree
Hide file tree
Showing 2 changed files with 7 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 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 @@ -21,7 +22,7 @@ fun YdsText(
) {
val textColor = color.takeOrElse {
style.color.takeOrElse {
LocalYdsContentColor.current
LocalYdsContentColor.current.copy(alpha = LocalYdsContentAlpha.current)
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.yourssu.design.system.compose.foundation

import androidx.compose.runtime.compositionLocalOf

val LocalYdsContentAlpha = compositionLocalOf { 1f }

0 comments on commit 4811d76

Please sign in to comment.