UNPKG

@gsretail.com/gui-core

Version:

A skeleton to create your own React component library using Rollup, TypeScript, Sass and Storybook

2 lines (1 loc) 1.94 kB
import{__assign as e}from"../../../../node_modules/tslib/tslib.es6.js";import t,{useState as n,useEffect as r}from"react";import{observer as o}from"mobx-react";import{Grid as i,Button as l,Box as m,Typography as c}from"@mui/material";import{Icons as a}from"../../../../node_modules/@gsretail.com/gui-icons/dist/index.js";import u from"./view/MenuListView.js";import s from"../../../../assets/theme/styles/color.js";import"@mui/material/styles";import"../../../../assets/theme/basicStyle.js";import{ShowButton as d,IconMenuWrap as f,TextMenuWrap as p,StyledBlind as v}from"./styled.js";var E=o((function(o){var s=o.verticalMove,E=o.hidden,h=o.onClickHideButton,M=o.activeMenuId,g=o.menuGroups,k=o.onRouteToMenu,C=o.onClickMenu,I=o.fullscreen,b=o.subGroupId,j=o.menuItemId,x=n(M||g[0].id),w=x[0],G=x[1],B=g.find((function(e){return e.id===w}));return r((function(){G(M)}),[M]),t.createElement(t.Fragment,null,t.createElement(d,{onClick:h,hidden:E,style:e({},I&&{display:"none"})},t.createElement(a.ChevronLeft,null)),t.createElement(i,{container:!0,style:e({},I&&{display:"none"})},t.createElement(f,{verticalMove:s},g.map((function(e,n){return t.createElement(t.Fragment,null,t.createElement(l,{key:"".concat(n,"-").concat(e.id),className:w===e.id?"active":void 0,onClick:function(){return function(e,t){G(e.id),C&&C(t)}(e,null)}},t.createElement(m,null,(o=a[(r=e).icon],t.createElement(o,{width:25,height:25,color:w===r.id?"#fff":"#848B9F"})),t.createElement(c,null,e.name))),("실적관리"===e.id||"방송자원관리"===e.id||"방송 후 관리"===e.id)&&t.createElement(y,null));var r,o}))),t.createElement(p,{verticalMove:s},B&&t.createElement(u,{hidden:E,parentMenuGroup:B,onRouteToMenu:k,onClickHideButton:h,subGroupId:b,menuItemId:j})),!E&&t.createElement(m,{onClick:h},t.createElement(v,{verticalMove:s}))))})),h=s.grey300,y=function(){return t.createElement(m,{sx:{width:40,minHeight:"1px",backgroundColor:h}})};export{E as default};