1 | "use strict";
|
2 | var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
3 | if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
4 | return cooked;
|
5 | };
|
6 | var __assign = (this && this.__assign) || function () {
|
7 | __assign = Object.assign || function(t) {
|
8 | for (var s, i = 1, n = arguments.length; i < n; i++) {
|
9 | s = arguments[i];
|
10 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
11 | t[p] = s[p];
|
12 | }
|
13 | return t;
|
14 | };
|
15 | return __assign.apply(this, arguments);
|
16 | };
|
17 | Object.defineProperty(exports, "__esModule", { value: true });
|
18 | var jsx_runtime_1 = require("react/jsx-runtime");
|
19 | var css_1 = require("@emotion/css");
|
20 | var SliderContainer = function (_a) {
|
21 | var id = _a.id, width = _a.width, children = _a.children, outerContainerStyles = _a.outerContainerStyles, setVisibleButtons = _a.setVisibleButtons;
|
22 | function isTouchableDevice() {
|
23 | return "ontouchstart" in window || window.navigator.maxTouchPoints > 0;
|
24 | }
|
25 | return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)("div", __assign({ id: id, className: "".concat((0, css_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n display: flex;\n\n ", "\n "], ["\n position: relative;\n display: flex;\n\n ", "\n "])), width
|
26 | ? { width: width }
|
27 | : "\n width: 1200px;\n\n @media (max-width: 1300px) {\n width: 900px;\n }\n \n @media (max-width: 960px) {\n width: 600px;\n }\n\n @media (max-width: 668px) {\n width: 400px;\n }\n\n @media (max-width: 420px) {\n width: 300px;\n }\n\n @media (max-width: 320px) {\n width: 260px;\n }\n\n "), " ").concat(outerContainerStyles), onMouseOver: function () { return !isTouchableDevice() && setVisibleButtons(true); }, onMouseOut: function () { return !isTouchableDevice() && setVisibleButtons(false); } }, { children: children })) }));
|
28 | };
|
29 | exports.default = SliderContainer;
|
30 | var templateObject_1;
|