@corva/dc-platform-shared 0.0.0-e60767 → 0.0.0-gridLock
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
import r from"@babel/runtime/helpers/defineProperty";import{makeStyles as e,Tooltip as
|
|
1
|
+
import r from"@babel/runtime/helpers/defineProperty";import{makeStyles as e,Tooltip as t,IconButton as o}from"@material-ui/core";import{UnlockIcon as a,LockIcon as c}from"@corva/ui/icons";import n from"classnames";import{jsx as i}from"react/jsx-runtime";function l(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.push.apply(t,o)}return t}function s(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?l(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):l(Object(o)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))}))}return e}var b=e((function(r){return{root:{width:36,height:36,"&:hover":{backgroundColor:r.palette.background.b7},borderRadius:"50%"},button:{width:"100%",height:"100%","&:hover":{backgroundColor:r.palette.background.b7}}}}));function d(r){var e=r.className,c=r.disabled,l=r.isDraggableAndResizable,d=r.LockIcon,u=r.lockIconClassName,p=r.onClick,m=r.pageName,f=r.tooltipProps,h=b();return i(t,s(s({title:c?"Can't unlock dashboard layout":l?"Lock Dashboard Layout":"Unlock Dashboard Layout"},f),{},{children:i("div",{className:n(h.root,e),children:i(o,{className:h.button,"data-testid":"".concat(m,"_").concat(l?"gridUnlocked":"gridLocked"),disabled:c,onClick:p,children:l?i(a,{}):i(d,{className:u})})})}))}d.defaultProps={LockIcon:c,tooltipProps:{}};export{d as default};
|