File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
material3/src/jsMain/kotlin/com/huanshankeji/compose/material3 Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -10,9 +10,9 @@ import com.huanshankeji.compose.web.attributes.isFalseOrNull
1010/* *
1111 * Calculate the step to match the Compose UI behavior.
1212 */
13- private fun calculateStep (steps : Int , valueRange : ClosedFloatingPointRange <Float >): Float =
14- // We can also use `Double.MIN_VALUE` and change the return type to `Number`, but `Float .MIN_VALUE` should be sufficient here.
15- if (steps > 0 ) (valueRange.endInclusive - valueRange.start) / (steps + 1 ) else Float .MIN_VALUE
13+ private fun calculateStep (steps : Int , valueRange : ClosedFloatingPointRange <Float >): Number =
14+ // JavaScript doesn't have a 32-bit float type so we just use `Double .MIN_VALUE` here.
15+ if (steps > 0 ) (valueRange.endInclusive - valueRange.start) / (steps + 1 ) else Double .MIN_VALUE
1616
1717@Composable
1818actual fun Slider (
You can’t perform that action at this time.
0 commit comments