template_0205

This commit is contained in:
Sofio
2026-02-05 13:16:05 +08:00
commit d93e4d9c9f
197 changed files with 52810 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
import type { Theme } from "./types"
const systemui = require("expo-system-ui")
/**
* Set the system UI background color to the given color. This is only available if the app has
* installed expo-system-ui.
*
* @param color The color to set the system UI background to
*/
export const setSystemUIBackgroundColor = (color: string) => {
if (systemui) {
systemui.setBackgroundColorAsync(color)
}
}
/**
* Set the app's native background color to match the theme.
* This is only available if the app has installed expo-system-ui
*
* @param theme The theme object to use for the background color
*/
export const setImperativeTheming = (theme: Theme) => {
setSystemUIBackgroundColor(theme.colors.background)
}