one
Version:
One is a React framework for web, iOS, and Android apps.
14 lines (11 loc) • 653 B
JavaScript
import { StyleSheet } from "react-native";
function viewportStyle(style) {
var flat = StyleSheet.flatten(style);
var hasSize = (flat === null || flat === void 0 ? void 0 : flat.height) != null || (flat === null || flat === void 0 ? void 0 : flat.aspectRatio) != null || (flat === null || flat === void 0 ? void 0 : flat.flex) != null || (flat === null || flat === void 0 ? void 0 : flat.flexBasis) != null || (flat === null || flat === void 0 ? void 0 : flat.flexGrow) != null;
return [hasSize ? { alignSelf: "stretch" } : {
flex: 1,
alignSelf: "stretch"
}, style];
}
export { viewportStyle };
//# sourceMappingURL=viewportStyle.native.js.map