-
Notifications
You must be signed in to change notification settings - Fork 0
/
ComposableUtils.kt
55 lines (47 loc) 路 1.43 KB
/
ComposableUtils.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package com.istudio.app.ui.composables
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Button
import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
@Composable
fun AppText(text : String){
Text(
text = text,
style = TextStyle(
fontSize = MaterialTheme.typography.displayLarge.fontSize,
fontWeight = FontWeight.Bold,
color = Color.White
)
)
}
@Composable
fun AppButton(
modifier: Modifier = Modifier,
text: String,
enabled : Boolean = true,
onClick: () -> Unit
) {
TextButton(
modifier = modifier,
onClick =onClick,
enabled = enabled
) {
Text(text = text)
}
}