UNPKG

2.64 kBJavaScriptView Raw
1"use strict";
2var __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};
13var __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};
24var __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};
31var __importDefault = (this && this.__importDefault) || function (mod) {
32 return (mod && mod.__esModule) ? mod : { "default": mod };
33};
34Object.defineProperty(exports, "__esModule", { value: true });
35var React = __importStar(require("react"));
36var clsx_1 = __importDefault(require("clsx"));
37var Toolbar_1 = __importDefault(require("@material-ui/core/Toolbar"));
38var styles_1 = require("@material-ui/core/styles");
39exports.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' });
57var 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};
63exports.default = PickerToolbar;