@pismo/bolt-pismo-bar
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -29,3 +29,6 @@ "use strict"; | ||
bar: (_a = { | ||
maxWidth: interfaces_1.maxWidth, | ||
maxWidth: function (_a) { | ||
var contract = _a.contract; | ||
return (contract ? interfaces_1.mobileMaxWidth : interfaces_1.maxWidth); | ||
}, | ||
backgroundColor: extra ? extra['background'].special : 'transparent' | ||
@@ -42,10 +45,13 @@ }, | ||
var _b; | ||
var full = _a.full; | ||
var full = _a.full, contract = _a.contract; | ||
return !full | ||
? (_b = {}, | ||
_b[theme.breakpoints.down('xs')] = { | ||
? __assign(__assign({}, (contract | ||
? { | ||
padding: 0, | ||
justifyContent: 'center' | ||
}, | ||
_b) : {}; | ||
} | ||
: {})), (_b = {}, _b[theme.breakpoints.down('xs')] = { | ||
padding: 0, | ||
justifyContent: 'center' | ||
}, _b)) : {}; | ||
}, | ||
@@ -60,4 +66,4 @@ title: { | ||
var ApplicationToolbar = function (_a) { | ||
var AppBarProps = _a.AppBarProps, ToolbarProps = _a.ToolbarProps, current = _a.current, onClick = _a.onClick, applications = _a.applications, full = _a.full; | ||
var classes = useStyles({ full: full }); | ||
var AppBarProps = _a.AppBarProps, ToolbarProps = _a.ToolbarProps, current = _a.current, onClick = _a.onClick, applications = _a.applications, full = _a.full, contract = _a.contract; | ||
var classes = useStyles({ full: full, contract: contract }); | ||
return (React.createElement(AppBar_1.default, __assign({ className: classes.bar }, AppBarProps), | ||
@@ -67,9 +73,9 @@ React.createElement(Toolbar_1.default, __assign({ className: classes.toolbar }, ToolbarProps), | ||
React.createElement(bolt_core_1.MenuIcon, { "data-testid": applications[current].name })), | ||
React.createElement(Hidden_1.default, { xsDown: full ? false : true }, | ||
contract ? null : (React.createElement(Hidden_1.default, { xsDown: full ? false : true }, | ||
React.createElement(Box_1.default, { ml: '5px' }, | ||
React.createElement(Typography_1.default, { className: classes.title, variant: 'body1' }, | ||
"Pismo", | ||
React.createElement("span", null, applications[current].name))))))); | ||
React.createElement("span", null, applications[current].name)))))))); | ||
}; | ||
exports.ApplicationToolbar = ApplicationToolbar; | ||
//# sourceMappingURL=ApplicationToolbar.js.map |
@@ -11,2 +11,3 @@ import { AppBarProps } from '@material-ui/core/AppBar'; | ||
full?: boolean; | ||
contract?: boolean; | ||
} | ||
@@ -13,0 +14,0 @@ export declare type ApplicationsName = 'Marketplace' | 'Adjustments' | 'Customer' | 'Backoffice' | 'WebPOS'; |
@@ -57,3 +57,3 @@ "use strict"; | ||
var PismoBar = function (_a) { | ||
var AppBarProps = _a.AppBarProps, ToolbarProps = _a.ToolbarProps, current = _a.current, appSelected = _a.appSelected; | ||
var AppBarProps = _a.AppBarProps, ToolbarProps = _a.ToolbarProps, current = _a.current, appSelected = _a.appSelected, contract = _a.contract; | ||
var classes = useStyles({}); | ||
@@ -75,3 +75,3 @@ var matches = useMediaQuery_1.default(function (theme) { return theme.breakpoints.down('xs'); }); | ||
return (React.createElement(Fragment, null, | ||
React.createElement(ApplicationToolbar_1.ApplicationToolbar, { applications: applications, AppBarProps: AppBarProps, ToolbarProps: ToolbarProps, current: current, onClick: toOpen }), | ||
React.createElement(ApplicationToolbar_1.ApplicationToolbar, { applications: applications, AppBarProps: AppBarProps, ToolbarProps: ToolbarProps, current: current, onClick: toOpen, contract: contract }), | ||
React.createElement(Drawer_1.default, { classes: { root: classes.drawer, paper: "" + classes.drawerPaper }, anchor: matches ? 'left' : 'top', open: isOpen, onClose: toClose, ModalProps: { hideBackdrop: true }, "data-testid": 'drawer' }, | ||
@@ -78,0 +78,0 @@ React.createElement(Grid_1.default, { container: true, spacing: 2, className: classes.appButtonContainer }, Object.keys(applications).map(function (k, index) { return (React.createElement(ApplicationButton_1.ApplicationButton, { data: applications[k], isSelected: k === current, key: k + "-" + index, onClick: appSelectedHandler })); })), |
{ | ||
"name": "@pismo/bolt-pismo-bar", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "Bolt component pismo-bar", | ||
@@ -36,8 +36,8 @@ "author": "Pismo <hello@pismo.io>", | ||
"build": "tsc", | ||
"test": "jest -u", | ||
"test": "jest", | ||
"manual-publish": "npm publish" | ||
}, | ||
"devDependencies": { | ||
"@pismo/bolt-core": "^1.2.0" | ||
"@pismo/bolt-core": "^1.2.2" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
18827
266