1 | "use strict";
|
2 | var __assign = (this && this.__assign) || function () {
|
3 | __assign = Object.assign || function(t) {
|
4 | for (var s, i = 1, n = arguments.length; i < n; i++) {
|
5 | s = arguments[i];
|
6 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
7 | t[p] = s[p];
|
8 | }
|
9 | return t;
|
10 | };
|
11 | return __assign.apply(this, arguments);
|
12 | };
|
13 | var __rest = (this && this.__rest) || function (s, e) {
|
14 | var t = {};
|
15 | for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
16 | t[p] = s[p];
|
17 | if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
18 | for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
19 | if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
20 | t[p[i]] = s[p[i]];
|
21 | }
|
22 | return t;
|
23 | };
|
24 | var __importStar = (this && this.__importStar) || function (mod) {
|
25 | if (mod && mod.__esModule) return mod;
|
26 | var result = {};
|
27 | if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
28 | result["default"] = mod;
|
29 | return result;
|
30 | };
|
31 | var __importDefault = (this && this.__importDefault) || function (mod) {
|
32 | return (mod && mod.__esModule) ? mod : { "default": mod };
|
33 | };
|
34 | Object.defineProperty(exports, "__esModule", { value: true });
|
35 | var React = __importStar(require("react"));
|
36 | var clsx_1 = __importDefault(require("clsx"));
|
37 | var Toolbar_1 = __importDefault(require("@material-ui/core/Toolbar"));
|
38 | var styles_1 = require("@material-ui/core/styles");
|
39 | exports.useStyles = styles_1.makeStyles(function (theme) { return ({
|
40 | toolbar: {
|
41 | display: 'flex',
|
42 | flexDirection: 'row',
|
43 | alignItems: 'center',
|
44 | justifyContent: 'center',
|
45 | height: 100,
|
46 | backgroundColor: theme.palette.type === 'light'
|
47 | ? theme.palette.primary.main
|
48 | : theme.palette.background.default,
|
49 | },
|
50 | toolbarLandscape: {
|
51 | height: 'auto',
|
52 | maxWidth: 150,
|
53 | padding: 8,
|
54 | justifyContent: 'flex-start',
|
55 | },
|
56 | }); }, { name: 'MuiPickersToolbar' });
|
57 | var PickerToolbar = function (_a) {
|
58 | var _b;
|
59 | var children = _a.children, isLandscape = _a.isLandscape, _c = _a.className, className = _c === void 0 ? null : _c, other = __rest(_a, ["children", "isLandscape", "className"]);
|
60 | var classes = exports.useStyles();
|
61 | return (React.createElement(Toolbar_1.default, __assign({ className: clsx_1.default(classes.toolbar, (_b = {}, _b[classes.toolbarLandscape] = isLandscape, _b), className) }, other), children));
|
62 | };
|
63 | exports.default = PickerToolbar;
|