@shopify/react-html
Version:
A component to render your React app with no static HTML
38 lines (35 loc) • 1.09 kB
JavaScript
import React from 'react';
import { Meta } from './Meta.mjs';
import { Link } from './Link.mjs';
let IconSize;
(function (IconSize) {
IconSize[IconSize["Large"] = 114] = "Large";
IconSize[IconSize["Medium"] = 72] = "Medium";
IconSize[IconSize["Small"] = 57] = "Small";
})(IconSize || (IconSize = {}));
function AppleHomeScreen({
icons = [],
startUpImage
}) {
const iconsMarkup = icons.map(({
size,
url
}) => /*#__PURE__*/React.createElement(Link, {
key: size,
rel: "apple-touch-icon",
sizes: `${size}x${size}`,
href: url
}));
const startUpImageMarkup = startUpImage ? /*#__PURE__*/React.createElement(Link, {
rel: "apple-touch-startup-image",
href: startUpImage
}) : null;
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Meta, {
name: "apple-mobile-web-app-capable",
content: "yes"
}), /*#__PURE__*/React.createElement(Meta, {
name: "apple-mobile-web-app-status-bar-style",
content: "black"
}), iconsMarkup, startUpImageMarkup);
}
export { AppleHomeScreen, IconSize };