Skip to content

Instantly share code, notes, and snippets.

View merttoptas's full-sized avatar

Mert Toptas merttoptas

View GitHub Profile
val Shapes = Shapes(
small = RoundedCornerShape(percent = 50),
medium = RoundedCornerShape(0f),
large = CutCornerShape(
topStart = 16.dp,
topEnd = 0.dp,
bottomEnd = 0.dp,
bottomStart = 16.dp
)
)
Text(
text = "This is merge style text",
color = MaterialTheme.colors.primary,
style = MaterialTheme.typography.subtitle1.merge(
TextStyle(
fontFamily = FontFamily(
Font(resId = R.font.poppins_semi_bold)
)
)
),
@Composable
fun ComposeSeriesTheme(
darkTheme: Boolean = isSystemInDarkTheme(),
content: @Composable() () -> Unit
) {
val colors = if (darkTheme) {
DarkColorPalette
} else {
LightColorPalette
}
val Typography = Typography(
h3 = TextStyle(
fontFamily = Poppins,
fontWeight = FontWeight.W600,
fontSize = 32.sp
),
h4 = TextStyle(
fontFamily = Poppins,
fontWeight = FontWeight.W600,
fontSize = 30.sp
val Poppins = FontFamily(
Font(R.font.poppins_regular, FontWeight.Normal),
Font(R.font.poppins_medium, FontWeight.W500),
Font(R.font.poppins_semi_bold, FontWeight.W600)
)
Text(
text = "Hello $name!",
style = MaterialTheme.typography.h5,
color = MaterialTheme.colors.secondary
)
private val DarkColorPalette = darkColors(
primary = DarkBlue,
primaryVariant = DarkViolet,
secondary = DarkViolet
)
private val LightColorPalette = lightColors(
primary = Orange,
primaryVariant = GrayishViolet,
secondary = DarkViolet,
val DarkBlue = Color(0xFF3C5186)
val DarkViolet = Color(0xFF9B72AA)
val GrayishViolet = Color(0xFFC6B4CE)
val Orange = Color(0xFFFFF5DE)
fun lightColors(
primary: Color = Color(0xFF6200EE),
primaryVariant: Color = Color(0xFF3700B3),
secondary: Color = Color(0xFF03DAC6),
secondaryVariant: Color = Color(0xFF018786),
background: Color = Color.White,
surface: Color = Color.White,
error: Color = Color(0xFFB00020),
onPrimary: Color = Color.White,
onSecondary: Color = Color.Black,
@Composable
fun Greeting(name: String) {
Text(text = "Hello $name!")
}