react-amphtml
Version:
Use amphtml components inside your React apps easily!
44 lines (37 loc) • 1.83 kB
JavaScript
'use strict';
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var React = require('react');
var React__default = _interopDefault(React);
/* eslint-disable react/no-danger */
const key = suffix => `react-amphtml-header-boilerplate-${suffix}`;
var headerBoilerplate = (href => [React__default.createElement("meta", {
key: key('meta-charset'),
charSet: "utf-8"
}), React__default.createElement("meta", {
key: key('meta-viewport'),
name: "viewport",
content: "width=device-width,minimum-scale=1,initial-scale=1"
}), React__default.createElement("link", {
key: key('canonical-link'),
rel: "canonical",
href: href
}), React__default.createElement("style", {
key: key('style'),
"amp-boilerplate": "",
dangerouslySetInnerHTML: {
__html: `
body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}
`
}
}), React__default.createElement("noscript", {
key: key('noscript')
}, React__default.createElement("style", {
"amp-boilerplate": "",
dangerouslySetInnerHTML: {
__html: `
body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}
`
}
}))]);
exports.default = headerBoilerplate;
//# sourceMappingURL=headerBoilerplate.js.map