package com.dong.maxhap.demos.material

import androidx.compose.ui.Modifier
import androidx.compose.material.Surface
import androidx.compose.material.Text
import androidx.compose.material.Slider
import androidx.compose.runtime.*
import androidx.compose.foundation.layout.*
import androidx.compose.ui.unit.dp

@Composable
internal fun ElevationSamples() {
    var elevation by remember { mutableStateOf(4f) }
    Column(Modifier.padding(12.dp), verticalArrangement = Arrangement.spacedBy(8.dp)) {
        Text("阴影: ${elevation.toInt()}dp")
        Slider(value = elevation, onValueChange = { elevation = it }, valueRange = 0f..24f)
        Surface(elevation = elevation.dp) {
            Box(Modifier.size(120.dp).padding(12.dp)) { Text("Surface with elevation") }
        }
    }
}
