Refactor fonts in login screen
This commit is contained in:
parent
8ed8bdcbd9
commit
1beaa7889e
@ -15,11 +15,14 @@ import androidx.compose.runtime.collectAsState
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.Shape
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.nto.presentation.composable.DecoratedButtonType.Default
|
||||
import com.nto.presentation.composable.DecoratedButtonType.Disabled
|
||||
import com.nto.presentation.theme.NTOTheme
|
||||
import com.nto.presentation.theme.raleway
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
import kotlinx.coroutines.flow.asStateFlow
|
||||
@ -88,7 +91,9 @@ fun DecoratedButton(
|
||||
) {
|
||||
Text(
|
||||
text,
|
||||
style = NTOTheme.typography.displaySmall,
|
||||
fontWeight = FontWeight.SemiBold,
|
||||
fontSize = 14.sp,
|
||||
fontFamily = raleway,
|
||||
color = NTOTheme.colors.secondaryText
|
||||
)
|
||||
}
|
||||
|
@ -1 +0,0 @@
|
||||
package com.nto.presentation.composable
|
@ -30,6 +30,7 @@ import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.Shape
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.input.PasswordVisualTransformation
|
||||
import androidx.compose.ui.text.input.VisualTransformation
|
||||
@ -39,6 +40,7 @@ import androidx.compose.ui.unit.sp
|
||||
import com.nto.presentation.R
|
||||
import com.nto.presentation.theme.BoxGray
|
||||
import com.nto.presentation.theme.NTOTheme
|
||||
import com.nto.presentation.theme.raleway
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
import kotlinx.coroutines.flow.asStateFlow
|
||||
@ -123,13 +125,18 @@ fun InputField(
|
||||
focusedIndicatorColor = Color.Transparent,
|
||||
),
|
||||
onValueChange = onValueChange,
|
||||
textStyle = NTOTheme.typography.displaySmall,
|
||||
textStyle = TextStyle(
|
||||
fontSize = 14.sp,
|
||||
fontWeight = FontWeight.Normal,
|
||||
color = NTOTheme.colors.primaryText,
|
||||
fontFamily = raleway
|
||||
),
|
||||
placeholder = {
|
||||
Text(
|
||||
placeholder,
|
||||
style = NTOTheme.typography.displaySmall,
|
||||
fontFamily = raleway,
|
||||
color = NTOTheme.colors.disabledText,
|
||||
fontWeight = FontWeight.Bold,
|
||||
fontWeight = FontWeight.Medium,
|
||||
fontSize = 14.sp
|
||||
)
|
||||
},
|
||||
|
@ -15,7 +15,7 @@ fun Navigation(navController: NavHostController, modifier: Modifier = Modifier)
|
||||
NavHost(
|
||||
navController = navController,
|
||||
modifier = modifier,
|
||||
startDestination = Destinations.Profile
|
||||
startDestination = Destinations.Login
|
||||
) {
|
||||
composable<Destinations.Login> {
|
||||
LoginScreen(navController)
|
||||
|
@ -20,8 +20,10 @@ import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.layout.ContentScale
|
||||
import androidx.compose.ui.res.colorResource
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
@ -34,6 +36,8 @@ import com.nto.presentation.composable.DecoratedButton
|
||||
import com.nto.presentation.composable.InputField
|
||||
import com.nto.presentation.composable.InputFieldOptions
|
||||
import com.nto.presentation.theme.NTOTheme
|
||||
import com.nto.presentation.theme.playfair
|
||||
import com.nto.presentation.theme.raleway
|
||||
|
||||
@Composable
|
||||
fun LoginScreen(
|
||||
@ -63,16 +67,20 @@ fun LoginScreen(
|
||||
}
|
||||
Text(
|
||||
text = stringResource(R.string.greeting_login),
|
||||
style = NTOTheme.typography.titleLarge,
|
||||
fontFamily = playfair,
|
||||
fontSize = 64.sp,
|
||||
color = NTOTheme.colors.secondaryText,
|
||||
textAlign = TextAlign.Center
|
||||
)
|
||||
Spacer(modifier = Modifier.height(5.dp))
|
||||
Text(
|
||||
text = stringResource(R.string.greeting_login_description),
|
||||
style = NTOTheme.typography.displaySmall,
|
||||
fontFamily = raleway,
|
||||
fontWeight = FontWeight.Medium,
|
||||
fontSize = 16.sp,
|
||||
color = NTOTheme.colors.secondaryText,
|
||||
textAlign = TextAlign.Center
|
||||
textAlign = TextAlign.Center,
|
||||
modifier = Modifier.width(300.dp)
|
||||
)
|
||||
Spacer(modifier = Modifier.height(60.dp))
|
||||
Column(
|
||||
@ -88,7 +96,9 @@ fun LoginScreen(
|
||||
Column(modifier = Modifier.fillMaxWidth()) {
|
||||
Text(
|
||||
stringResource(R.string.text_login),
|
||||
style = NTOTheme.typography.displaySmall,
|
||||
fontFamily = raleway,
|
||||
fontWeight = FontWeight.Medium,
|
||||
color = NTOTheme.colors.primaryText,
|
||||
modifier = Modifier.padding(start = 10.dp),
|
||||
fontSize = 14.sp
|
||||
)
|
||||
@ -103,7 +113,9 @@ fun LoginScreen(
|
||||
Column(modifier = Modifier.fillMaxWidth()) {
|
||||
Text(
|
||||
stringResource(R.string.text_password),
|
||||
style = NTOTheme.typography.displaySmall,
|
||||
fontFamily = raleway,
|
||||
fontWeight = FontWeight.Medium,
|
||||
color = NTOTheme.colors.primaryText,
|
||||
modifier = Modifier.padding(start = 10.dp),
|
||||
fontSize = 14.sp
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user