storybook-amp
Version:
Storybook addon for AMP Html. Allows to display in your stories AMP Html components generated with React.
14 lines (13 loc) • 858 B
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _default = function _default(_ref) {
var _ref$title = _ref.title,
title = _ref$title === void 0 ? 'AMP4Ads Demo' : _ref$title,
scripts = _ref.scripts,
styles = _ref.styles;
return "\n<html amp4ads lang=\"en\">\n <head>\n <meta charSet=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width,minimum-scale=1\">\n <title>".concat(title, "</title>\n\n <style amp4ads-boilerplate>body{visibility:hidden}</style>\n <script async src=\"https://cdn.ampproject.org/amp4ads-v0.js\"></script>\n ").concat(scripts ? scripts.trim() : '', "\n\n <style amp-custom>").concat(styles, "</style>\n </head>\n <body>\n <!-- STORY CODE -->\n </body>\n</html>");
};
exports["default"] = _default;