Browse Source
- Apply window insets for UI containers - Update the screenshot - Align gradle.properties with other examples - Add jetsnack to all example verification scriptspull/4755/head
Oleksandr Karpovich
8 months ago
committed by
GitHub
16 changed files with 46 additions and 65 deletions
@ -1,12 +1,12 @@
|
||||
package com.example.jetsnack.ui.home |
||||
|
||||
import androidx.compose.foundation.layout.WindowInsets |
||||
import androidx.compose.foundation.layout.add |
||||
import androidx.compose.foundation.layout.statusBars |
||||
import androidx.compose.runtime.Composable |
||||
import androidx.compose.ui.unit.dp |
||||
|
||||
@Composable |
||||
actual fun snackCollectionListItemWindowInsets(): WindowInsets { |
||||
// TODO: implement |
||||
// WindowInsets.statusBars.add(WindowInsets(top = 56.dp)) |
||||
return WindowInsets(top = 56.dp) |
||||
return WindowInsets.statusBars.add(WindowInsets(top = 56.dp)) |
||||
} |
@ -1,11 +1,21 @@
|
||||
package com.example.jetsnack.ui.snackdetail |
||||
|
||||
import androidx.compose.foundation.layout.WindowInsets |
||||
import androidx.compose.foundation.layout.navigationBars |
||||
import androidx.compose.foundation.layout.statusBars |
||||
import androidx.compose.foundation.layout.systemBars |
||||
import androidx.compose.foundation.layout.windowInsetsPadding |
||||
import androidx.compose.runtime.Composable |
||||
import androidx.compose.ui.Modifier |
||||
|
||||
actual fun Modifier.jetSnackNavigationBarsPadding(): Modifier = this |
||||
// .navigationBarsPadding() |
||||
@Composable |
||||
actual fun Modifier.jetSnackNavigationBarsPadding(): Modifier = |
||||
this.windowInsetsPadding(WindowInsets.navigationBars) |
||||
|
||||
actual fun Modifier.jetSnackStatusBarsPadding(): Modifier = this |
||||
// statusBarsPadding() |
||||
actual fun Modifier.jetSnackSystemBarsPadding(): Modifier = this |
||||
// Modifier.systemBarsPadding() |
||||
@Composable |
||||
actual fun Modifier.jetSnackStatusBarsPadding(): Modifier = |
||||
this.windowInsetsPadding(WindowInsets.statusBars) |
||||
|
||||
@Composable |
||||
actual fun Modifier.jetSnackSystemBarsPadding(): Modifier = |
||||
this.windowInsetsPadding(WindowInsets.systemBars) |
After Width: | Height: | Size: 2.8 MiB |
@ -1,5 +0,0 @@
|
||||
import { instantiate } from './jetsnackwasmapp.uninstantiated.mjs'; |
||||
|
||||
await wasmSetup; |
||||
|
||||
instantiate({ skia: Module['asm'] }); |
@ -1,7 +0,0 @@
|
||||
config.entry = { |
||||
main: [require('path').resolve(__dirname, "kotlin/load.mjs")] |
||||
}; |
||||
|
||||
config.resolve ?? (config.resolve = {}); |
||||
config.resolve.alias ?? (config.resolve.alias = {}); |
||||
config.resolve.alias.skia = false; |
Loading…
Reference in new issue