package com.suno.android.common_ui.components import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import com.suno.android.common_core_utils.model.Url import com.suno.android.common_ui.components.images.ProfileAvatarImage import com.suno.android.common_ui.theme.ExtendedTheme import com.suno.android.common_ui.theme.SunoTheme @Composable fun ArtistMediumDetail( modifier: Modifier = Modifier, creatorAvatarUrl: Url?, creatorName: String, artistTextColor: Color = ExtendedTheme.colors.textPrimary, ) { Row( modifier.height(36.dp), verticalAlignment = Alignment.CenterVertically, ) { ProfileAvatarImage( modifier = Modifier.size(24.dp), avatarUrl = creatorAvatarUrl, contentDescription = creatorName, ) Text( modifier = Modifier.padding(start = 8.dp), text = creatorName, color = artistTextColor, maxLines = 1, overflow = TextOverflow.Ellipsis, style = ExtendedTheme.typography.smallBody, ) } } @Preview( showBackground = true, showSystemUi = true, ) @Composable private fun ArtistMediumDetail_Preview() { SunoTheme { ArtistMediumDetail( creatorName = "ZeroNanachi \uD83D\uDE3C\uD83C\uDF63", creatorAvatarUrl = null, ) } }