window.WindowOrientation
Whether the window is taller than wide or wider than tall, for picking a layout.
Utilisation
Read the current viewport
Ce type est utilisé par window.orientation
import { Text, window } from 'kuito';
<Text>{`${window.size.value.width} × ${window.size.value.height}`}</Text>;
<Text>{window.orientation.value === 'landscape' ? 'Wide' : 'Tall'}</Text>;
window.insets.value; // { top, left, bottom, right }Déclaration du type
export type WindowOrientation = Orientation;Type
"portrait" | "landscape"Généré depuis les déclarations TypeScript publiques : signatures, props et valeurs par défaut viennent de la source vérifiée, les descriptions de sa JSDoc. Aucune valeur par défaut n'est inventée.