Skip to content

Commit

Permalink
→ Moves: styles to top of the previews
Browse files Browse the repository at this point in the history
  • Loading branch information
AjeshRPai committed Jun 10, 2024
1 parent 7266580 commit ab59085
Showing 1 changed file with 37 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,43 @@ fun RecordingPanel(model: RecordingPanelUIModel?, amplitudes: List<Float>) {
}
}

private val headerStyle: TextStyle
@Composable
get() = androidx.compose.material3.MaterialTheme.typography.bodyLarge.copy(
fontWeight = FontWeight.SemiBold,
fontSize = 20.sp,
color = MaterialTheme.colors.onSurface.copy(alpha = ContentAlpha.high)
)

private val secondaryHeaderStyle: TextStyle
@Composable
get() = androidx.compose.material3.MaterialTheme.typography.bodySmall.copy(
fontWeight = FontWeight.Normal,
fontSize = 16.sp,
color = MaterialTheme.colors.onSurface.copy(alpha = ContentAlpha.medium)
)

private val actionLabelStyle: TextStyle
@Composable
get() = androidx.compose.material3.MaterialTheme.typography.bodyMedium.copy(
color = MaterialTheme.colors.onSurface.copy(alpha = ContentAlpha.high)
)

private val errorMessageStyle: TextStyle
@Composable
get() = androidx.compose.material3.MaterialTheme.typography.titleMedium.copy(
fontWeight = FontWeight.Normal,
fontSize = 16.sp,
color = MaterialTheme.colors.onSurface.copy(alpha = ContentAlpha.high)
)

private val errorUrlLinkCTA: TextStyle
@Composable
get() = androidx.compose.material3.MaterialTheme.typography.titleMedium.copy(
fontWeight = FontWeight.Normal,
fontSize = 16.sp,
color = MaterialTheme.colors.primary
)

@Preview(showBackground = true)
@Preview(showBackground = true, device = Devices.PIXEL_4_XL, uiMode = Configuration.UI_MODE_NIGHT_YES)
Expand Down Expand Up @@ -300,44 +337,6 @@ fun PreviewRecordingView() {
}
}

private val headerStyle: TextStyle
@Composable
get() = androidx.compose.material3.MaterialTheme.typography.bodyLarge.copy(
fontWeight = FontWeight.SemiBold,
fontSize = 20.sp,
color = MaterialTheme.colors.onSurface.copy(alpha = ContentAlpha.high)
)

private val secondaryHeaderStyle: TextStyle
@Composable
get() = androidx.compose.material3.MaterialTheme.typography.bodySmall.copy(
fontWeight = FontWeight.Normal,
fontSize = 16.sp,
color = MaterialTheme.colors.onSurface.copy(alpha = ContentAlpha.medium)
)

private val actionLabelStyle: TextStyle
@Composable
get() = androidx.compose.material3.MaterialTheme.typography.bodyMedium.copy(
color = MaterialTheme.colors.onSurface.copy(alpha = ContentAlpha.high)
)

private val errorMessageStyle: TextStyle
@Composable
get() = androidx.compose.material3.MaterialTheme.typography.titleMedium.copy(
fontWeight = FontWeight.Normal,
fontSize = 16.sp,
color = MaterialTheme.colors.onSurface.copy(alpha = ContentAlpha.high)
)

private val errorUrlLinkCTA: TextStyle
@Composable
get() = androidx.compose.material3.MaterialTheme.typography.titleMedium.copy(
fontWeight = FontWeight.Normal,
fontSize = 16.sp,
color = MaterialTheme.colors.primary
)

@Preview(showBackground = true)
@Preview(showBackground = true, device = Devices.PIXEL_4_XL, uiMode = Configuration.UI_MODE_NIGHT_YES)
@Composable
Expand Down

0 comments on commit ab59085

Please sign in to comment.