File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed
core-shared-ui/src/main/java/com/codandotv/streamplayerapp/core_shared_ui/widget/player Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ package com.codandotv.streamplayerapp.core_shared_ui.widget.player
2+
3+ import androidx.compose.foundation.layout.padding
4+ import androidx.compose.material3.Card
5+ import androidx.compose.material3.CardDefaults
6+ import androidx.compose.material3.MaterialTheme
7+ import androidx.compose.material3.Text
8+ import androidx.compose.runtime.Composable
9+ import androidx.compose.ui.Modifier
10+ import androidx.compose.ui.graphics.Color
11+ import androidx.compose.ui.graphics.RectangleShape
12+ import androidx.compose.ui.res.stringResource
13+ import androidx.compose.ui.text.font.FontWeight
14+ import androidx.compose.ui.unit.dp
15+ import com.codandotv.streamplayerapp.core.shared.ui.R
16+ import com.codandotv.streamplayerapp.core_shared_ui.theme.ThemePreviews
17+
18+ @Composable
19+ fun PreviewBadge (modifier : Modifier = Modifier ) {
20+ Card (
21+ modifier = modifier,
22+ colors = CardDefaults .cardColors(
23+ containerColor = Color .Black .copy(
24+ alpha = 0.5f
25+ )
26+ ),
27+ shape = RectangleShape
28+ ) {
29+ Text (
30+ text = stringResource(id = R .string.player_preview),
31+ style = MaterialTheme .typography.labelMedium.copy(
32+ color = Color .White ,
33+ fontWeight = FontWeight .SemiBold
34+ ),
35+ modifier = Modifier .padding(
36+ horizontal = 8 .dp,
37+ vertical = 4 .dp
38+ )
39+ )
40+ }
41+ }
42+
43+ @ThemePreviews
44+ @Composable
45+ fun PreviewBadgePreview () {
46+ PreviewBadge ()
47+ }
You can’t perform that action at this time.
0 commit comments