feat(ui): add shared components (StationCard, TrackListItem, SearchBar, FilterChips, MiniPlayer, EmptyState)

This commit is contained in:
nk
2026-06-01 12:58:25 +03:00
parent 28309c201e
commit 116ab95abd
6 changed files with 304 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
package com.radiola.ui.components
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.material3.TextField
import androidx.compose.material3.TextFieldDefaults
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
import com.composables.icons.lucide.Lucide
import com.composables.icons.lucide.Search
@Composable
fun SearchBar(
query: String,
onQueryChange: (String) -> Unit,
placeholder: String = "Поиск станции...",
modifier: Modifier = Modifier
) {
TextField(
value = query,
onValueChange = onQueryChange,
modifier = modifier
.fillMaxWidth()
.background(Color(0xFF2A2A2A), RoundedCornerShape(8.dp)),
placeholder = { Text(placeholder, color = Color(0xFF888888)) },
leadingIcon = { Icon(Lucide.Search, contentDescription = null, tint = Color(0xFF888888)) },
singleLine = true,
colors = TextFieldDefaults.colors(
focusedContainerColor = Color(0xFF2A2A2A),
unfocusedContainerColor = Color(0xFF2A2A2A),
focusedIndicatorColor = Color.Transparent,
unfocusedIndicatorColor = Color.Transparent,
focusedTextColor = Color.White,
unfocusedTextColor = Color.White
)
)
}