add - layout web

This commit is contained in:
Victor
2025-09-17 16:03:50 +02:00
parent 2ef16e4be7
commit 3acfea7551
13 changed files with 290 additions and 236 deletions
+45 -4
View File
@@ -1,7 +1,48 @@
import "@expo/metro-runtime";
import { registerRootComponent } from "expo";
import "./src/styles/css/global.css";
import '@expo/metro-runtime';
import { registerRootComponent } from 'expo';
import App from "./App";
// Inject minimal global CSS and a small setNativeProps polyfill for web
if (typeof document !== 'undefined') {
const style = document.createElement('style');
style.setAttribute('data-inline-global', 'true');
style.innerHTML = `
html, body, #root { height: 100%; }
body { margin: 0; }
*:focus { outline: none; }
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; }
`;
document.head.appendChild(style);
const proto = window.HTMLElement && window.HTMLElement.prototype;
if (proto && typeof proto.setNativeProps !== 'function') {
proto.setNativeProps = function (nativeProps = {}) {
try {
const { style: s, pointerEvents, ...rest } = nativeProps || {};
if (pointerEvents != null) {
this.style.pointerEvents = pointerEvents;
}
if (s && typeof s === 'object') {
for (const k in s) {
if (Object.prototype.hasOwnProperty.call(s, k)) {
try {
this.style[k] = s[k];
} catch {}
}
}
}
for (const k in rest) {
if (Object.prototype.hasOwnProperty.call(rest, k)) {
try {
this.style[k] = rest[k];
} catch {}
}
}
} catch {}
};
}
}
import App from './App';
registerRootComponent(App);