@shopify/react-html
Version:
A component to render your react app with no static HTML.
20 lines (19 loc) • 657 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var hooks_1 = require("../hooks");
function Responsive(_a) {
var _b = _a.coverNotch, coverNotch = _b === void 0 ? true : _b, _c = _a.allowPinchToZoom, allowPinchToZoom = _c === void 0 ? true : _c;
var viewportParts = ['width=device-width', 'initial-scale=1'];
if (coverNotch) {
viewportParts.push('viewport-fit=cover');
}
if (!allowPinchToZoom) {
viewportParts.push('user-scalable=no');
}
hooks_1.useMeta({
name: 'viewport',
content: viewportParts.join(', '),
});
return null;
}
exports.Responsive = Responsive;