generated from mpetuska/template-kmp-library
-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathMDCElevation.kt
34 lines (31 loc) · 788 Bytes
/
MDCElevation.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package showcases
import androidx.compose.runtime.*
import dev.petuska.katalog.runtime.*
import dev.petuska.katalog.runtime.layout.*
import dev.petuska.kmdc.elevation.*
import dev.petuska.kmdc.typography.*
import org.jetbrains.compose.web.css.*
import sandbox.control.*
private class MDCElevationVM {
var z by mutableStateOf(12)
}
@Composable
@Showcase(id = "MDCElevation")
fun MDCElevation() = InteractiveShowcase(
viewModel = { MDCElevationVM() },
controls = {
RangeControl("Z", ::z, max = 24, converter = Number::toInt)
},
) {
MDCElevation(z = z, attrs = {
style {
width(200.px)
height(100.px)
display(DisplayStyle.Flex)
alignItems(AlignItems.Center)
justifyContent(JustifyContent.Center)
}
}) {
MDCBody1("z: ${z}dp")
}
}