UNPKG

@kiwicom/smart-faq

Version:
97 lines (81 loc) 5.15 kB
"use strict"; var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.CheckMagicLink = exports.CheckRecoveryLink = void 0; var _style = _interopRequireDefault(require("styled-jsx/style")); var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")); var _idx = _interopRequireDefault(require("idx")); var React = _interopRequireWildcard(require("react")); var _Text = _interopRequireDefault(require("@kiwicom/orbit-components/lib/Text")); var _Text2 = _interopRequireDefault(require("@kiwicom/nitro/lib/components/Text")); var _CloseButton = _interopRequireDefault(require("./../common/buttons/CloseButton")); // @flow var image = "https://images.kiwi.com/smart-faq/mailbox@3x.png"; var style = new String(".Email{width:480px;padding-top:240px;}p.title{font-size:28px;font-weight:bold;line-height:1.2;margin-bottom:8px;color:#171b1e;}div.picture{margin:0px 127px 52px 127px;}div.picture img{height:188px;width:226px;}div.text{margin-left:40px;margin-right:40px;}span.email-text{font-weight:bold;color:#171b1e;}@media only screen and (max-width:480px){.Email{width:100%;padding-top:108px;}p.title{font-size:22px;}div.help-title{height:24px;font-size:20px;font-weight:bold;line-height:1.2;text-align:center;color:#171b1e;}div.text{margin:40px 16px 0px 16px;}div.picture{text-align:center;margin:0;}}@media only screen and (max-height:480px) and (orientation:landscape){.Email{width:100%;padding-top:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:space-around;-webkit-justify-content:space-around;-ms-flex-pack:space-around;justify-content:space-around;}p.title{font-size:22px;text-align:center;}div.picture{display:none;}}"); style.__hash = "1796127838"; style.__scoped = ".Email.jsx-3230842975{width:480px;padding-top:240px;}p.title.jsx-3230842975{font-size:28px;font-weight:bold;line-height:1.2;margin-bottom:8px;color:#171b1e;}div.picture.jsx-3230842975{margin:0px 127px 52px 127px;}div.picture.jsx-3230842975 img.jsx-3230842975{height:188px;width:226px;}div.text.jsx-3230842975{margin-left:40px;margin-right:40px;}span.email-text.jsx-3230842975{font-weight:bold;color:#171b1e;}@media only screen and (max-width:480px){.Email.jsx-3230842975{width:100%;padding-top:108px;}p.title.jsx-3230842975{font-size:22px;}div.help-title.jsx-3230842975{height:24px;font-size:20px;font-weight:bold;line-height:1.2;text-align:center;color:#171b1e;}div.text.jsx-3230842975{margin:40px 16px 0px 16px;}div.picture.jsx-3230842975{text-align:center;margin:0;}}@media only screen and (max-height:480px) and (orientation:landscape){.Email.jsx-3230842975{width:100%;padding-top:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:space-around;-webkit-justify-content:space-around;-ms-flex-pack:space-around;justify-content:space-around;}p.title.jsx-3230842975{font-size:22px;text-align:center;}div.picture.jsx-3230842975{display:none;}}"; style.__scopedHash = "3230842975"; /*:: type Props = { text: React.Node, location: { state: { email: string, }, }, };*/ var CheckEmail = function CheckEmail(props /*: Props*/ ) { var location = props.location; var email = (0, _idx.default)(location, function (_) { return _.state.email; }) || 'example@gmail.com'; return React.createElement(React.Fragment, null, React.createElement("div", { className: "jsx-".concat(style.__scopedHash) + " " + "Email" }, React.createElement(_CloseButton.default, null), React.createElement("div", { className: "jsx-".concat(style.__scopedHash) + " " + "picture" }, React.createElement("img", { alt: "Email", src: image, className: "jsx-".concat(style.__scopedHash) })), React.createElement("div", { className: "jsx-".concat(style.__scopedHash) + " " + "text" }, React.createElement("p", { className: "jsx-".concat(style.__scopedHash) + " " + "title" }, React.createElement(_Text2.default, { t: "smartfaq.email_page.title" })), React.createElement(_Text.default, { type: "secondary", element: "span" }, props.text, React.createElement("span", { className: "jsx-".concat(style.__scopedHash) + " " + "email-text" }, " ".concat(email)), "."))), React.createElement(_style.default, { styleId: style.__scopedHash, css: style.__scoped })); }; var CheckRecoveryLink = function CheckRecoveryLink(props /*: Props*/ ) { var text = React.createElement(_Text2.default, { t: "smartfaq.email_page.recovery_link_subtitle" }); return React.createElement(CheckEmail, (0, _extends2.default)({}, props, { text: text })); }; exports.CheckRecoveryLink = CheckRecoveryLink; var CheckMagicLink = function CheckMagicLink(props /*: Props*/ ) { var text = React.createElement(_Text2.default, { t: "smartfaq.email_page.magic_link_subtitle" }); return React.createElement(CheckEmail, (0, _extends2.default)({}, props, { text: text })); }; exports.CheckMagicLink = CheckMagicLink;