Remove unnecessary Box wrapping.

This commit is contained in:
Benoit Marty 2024-04-15 13:42:37 +02:00
parent 81f32b36b8
commit 62e25fa996
2 changed files with 93 additions and 97 deletions

View file

@ -59,7 +59,6 @@ fun GradientFloatingActionButton(
shape: Shape = RoundedCornerShape(25), shape: Shape = RoundedCornerShape(25),
content: @Composable () -> Unit, content: @Composable () -> Unit,
) { ) {
Box {
val linearShaderBrush = remember { val linearShaderBrush = remember {
object : ShaderBrush() { object : ShaderBrush() {
override fun createShader(size: Size): Shader { override fun createShader(size: Size): Shader {
@ -111,7 +110,6 @@ fun GradientFloatingActionButton(
} }
} }
} }
}
@PreviewsDayNight @PreviewsDayNight
@Composable @Composable

View file

@ -71,7 +71,6 @@ fun SuperButton(
ButtonSize.Small -> PaddingValues(horizontal = 16.dp, vertical = 5.dp) ButtonSize.Small -> PaddingValues(horizontal = 16.dp, vertical = 5.dp)
} }
} }
Box {
val isLightTheme = ElementTheme.isLightTheme val isLightTheme = ElementTheme.isLightTheme
val colors = remember(isLightTheme) { val colors = remember(isLightTheme) {
if (isLightTheme) { if (isLightTheme) {
@ -131,7 +130,6 @@ fun SuperButton(
} }
} }
} }
}
@PreviewsDayNight @PreviewsDayNight
@Composable @Composable