11import androidx.compose.animation.*
22import androidx.compose.animation.core.*
33import androidx.compose.foundation.layout.*
4- import androidx.compose.material.Divider
5- import androidx.compose.material .MaterialTheme
6- import androidx.compose.material .Text
4+ import androidx.compose.material3.HorizontalDivider
5+ import androidx.compose.material3 .MaterialTheme
6+ import androidx.compose.material3 .Text
77import androidx.compose.ui.Alignment
88import androidx.compose.ui.Modifier
99import androidx.compose.ui.platform.LocalDensity
1010import androidx.compose.ui.unit.IntOffset
1111import androidx.compose.ui.unit.dp
1212import dev.bnorm.storyboard.StoryboardBuilder
1313import dev.bnorm.storyboard.easel.template.*
14- import dev.bnorm.storyboard.easel.template.rememberAdvanceDirection
1514import dev.bnorm.storyboard.toState
1615import kotlin.math.roundToInt
1716
@@ -28,7 +27,7 @@ fun StoryboardBuilder.AnimationScene() = scene(
2827
2928 Column (verticalArrangement = Arrangement .spacedBy(16 .dp), modifier = Modifier .padding(16 .dp)) {
3029 Header { Text (" Animation" ) }
31- Divider (color = MaterialTheme .colors .primary)
30+ HorizontalDivider (color = MaterialTheme .colorScheme .primary)
3231 }
3332
3433 BoxWithConstraints (Modifier .fillMaxSize()) {
@@ -41,7 +40,7 @@ fun StoryboardBuilder.AnimationScene() = scene(
4140 enter = direction.enter(start = { fadeIn(quick()) }, end = { fadeIn() }),
4241 exit = fadeOut(),
4342 modifier = Modifier .align(Alignment .Center ),
44- content = { Text (" Things can appear!" , style = MaterialTheme .typography.h4 ) },
43+ content = { Text (" Things can appear!" , style = MaterialTheme .typography.headlineLarge ) },
4544 )
4645
4746 // TODO there seems to be a Compose bug where the first time it goes through the animation
@@ -58,7 +57,7 @@ fun StoryboardBuilder.AnimationScene() = scene(
5857 end = { slideOutHorizontally { halfWidth + it / 2 } },
5958 ),
6059 modifier = Modifier .align(Alignment .Center ),
61- content = { Text (" Things can move!" , style = MaterialTheme .typography.h4 ) },
60+ content = { Text (" Things can move!" , style = MaterialTheme .typography.headlineLarge ) },
6261 )
6362
6463 state.AnimatedVisibility (
@@ -78,22 +77,22 @@ fun StoryboardBuilder.AnimationScene() = scene(
7877 modifier = Modifier .align(Alignment .Center ),
7978 ) {
8079 Column (horizontalAlignment = Alignment .CenterHorizontally ) {
81- Text (" All using Compose animation!" , style = MaterialTheme .typography.h4 )
80+ Text (" All using Compose animation!" , style = MaterialTheme .typography.headlineLarge )
8281
8382 state.AnimatedVisibility (
8483 visible = { it >= 4 },
8584 enter = fadeIn() + expandVertically(),
8685 exit = fadeOut() + shrinkVertically(),
8786 ) {
8887 Row {
89- Text (" With lots of configuration." , style = MaterialTheme .typography.h4 )
88+ Text (" With lots of configuration." , style = MaterialTheme .typography.headlineLarge )
9089
9190 state.AnimatedVisibility (
9291 visible = { it >= 5 },
9392 enter = fadeIn() + expandHorizontally(),
9493 exit = fadeOut() + shrinkHorizontally(),
9594 ) {
96- Text (" Like, a lot." , style = MaterialTheme .typography.h4 )
95+ Text (" Like, a lot." , style = MaterialTheme .typography.headlineLarge )
9796 }
9897 }
9998 }
0 commit comments