fun KodeeIconSmall()

in ui-components/src/commonMain/kotlin/org/jetbrains/kotlinconf/ui/components/Kodee.kt [53:78]


fun KodeeIconSmall(
    emotion: Emotion,
    selected: Boolean,
    modifier: Modifier = Modifier,
    contentDescription: String? = ratingDescription(emotion),
) {
    val resource = if (selected) {
        when (emotion) {
            Emotion.Negative -> UiRes.drawable.kodee_small_negative_filled
            Emotion.Neutral -> UiRes.drawable.kodee_small_neutral_filled
            Emotion.Positive -> UiRes.drawable.kodee_small_positive_filled
        }
    } else {
        when (emotion) {
            Emotion.Negative -> UiRes.drawable.kodee_small_negative_outline
            Emotion.Neutral -> UiRes.drawable.kodee_small_neutral_outline
            Emotion.Positive -> UiRes.drawable.kodee_small_positive_outline
        }
    }

    Image(
        imageVector = vectorResource(resource),
        contentDescription = contentDescription,
        modifier = modifier.size(24.dp),
    )
}