We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 909d36f commit b5adc22Copy full SHA for b5adc22
README.md
@@ -115,14 +115,16 @@ const styleObject = {
115
116
```js
117
import { process } from "react-native-css-media-query-processor";
118
+import { Dimensions } from "react-native";
119
-const matchObject = {
120
- width: 110,
121
- height: 100,
122
- orientation: "landscape",
123
- aspect-ratio: 1.1,
+const win = Dimensions.get("window");
+const matchObj = {
+ width: win.width,
+ height: win.height,
124
+ orientation: win.width > win.height ? "landscape" : "portrait",
125
+ "aspect-ratio": win.width / win.height,
126
type: "screen"
-}
127
+};
128
129
process(styleObject, matchObject);
130
```
0 commit comments