UNPKG

@wulperstudio/cms

Version:
104 lines (103 loc) 4.21 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.HeaderLayoutEditor = void 0; var _react = _interopRequireDefault(require("react")); var _react2 = require("@iconify/react"); var _material = require("@mui/material"); var _styled = require("./styled"); var _consts = require("../../helpers/consts"); var _icons = require("../../helpers/icons"); var _IconButtonComponent = require("../../components/IconButtonComponent"); var _jsxRuntime = require("react/jsx-runtime"); var HeaderLayoutEditor = exports.HeaderLayoutEditor = function HeaderLayoutEditor(props) { var theme = (0, _material.useTheme)(); return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styled.Header, { children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Grid, { container: true, direction: "row", alignItems: "center", children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Grid, { item: true, xs: true, children: !props.hideBackIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", { children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButtonComponent.IconButtonComponent, { iconProps: { onClick: function onClick() { return props.backFunction && props.backFunction(); }, sx: { boxShadow: _consts.consts.boxShadowStyle } }, children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_react2.Icon, { icon: _icons.ICONS_NAME.back_arrow, color: theme.palette.primary.main }) }) }) }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Grid, { item: true, children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Stack, { direction: "row", spacing: 2, children: [!props.hideUploadIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButtonComponent.IconButtonComponent, { iconProps: { onClick: function onClick() { return props.onPublishFunction && props.onPublishFunction(); }, sx: { boxShadow: _consts.consts.boxShadowStyle } }, children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_react2.Icon, { icon: "ant-design:cloud-upload-outlined", color: theme.palette.primary.main }) }), !props.hideSaveIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButtonComponent.IconButtonComponent, { iconProps: { onClick: function onClick() { return props.callback && props.callback(); }, sx: { boxShadow: _consts.consts.boxShadowStyle } }, children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_react2.Icon, { icon: "heroicons-outline:save-as", color: theme.palette.primary.main }) }), !props.hideViewIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButtonComponent.IconButtonComponent, { iconProps: { onClick: function onClick() { return props.onPreviewFunction && props.onPreviewFunction(); }, sx: { boxShadow: _consts.consts.boxShadowStyle } }, children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_react2.Icon, { icon: "akar-icons:eye", color: theme.palette.primary.main }) }), !props.hideMoreIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconButtonComponent.IconButtonComponent, { iconProps: { onClick: function onClick() { return props.onMoreIconFunction && props.onMoreIconFunction(); }, sx: { boxShadow: _consts.consts.boxShadowStyle } }, children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_react2.Icon, { icon: "akar-icons:more-horizontal", color: theme.palette.primary.main }) })] }) })] }) }); };