68d0c38e2ae60c4b8d2484df131cc499.json 5.15 KB
{"ast":null,"code":"import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\n/* eslint-disable no-underscore-dangle */\n\n/* eslint-disable react/prop-types */\n\nimport * as React from 'react';\nimport classnames from 'classnames';\nvar PanelContent = React.forwardRef(function (props, ref) {\n  var _classnames;\n\n  var prefixCls = props.prefixCls,\n      forceRender = props.forceRender,\n      className = props.className,\n      style = props.style,\n      children = props.children,\n      isActive = props.isActive,\n      role = props.role;\n\n  var _React$useState = React.useState(isActive || forceRender),\n      _React$useState2 = _slicedToArray(_React$useState, 2),\n      rendered = _React$useState2[0],\n      setRendered = _React$useState2[1];\n\n  React.useEffect(function () {\n    if (forceRender || isActive) {\n      setRendered(true);\n    }\n  }, [forceRender, isActive]);\n\n  if (!rendered) {\n    return null;\n  }\n\n  return React.createElement(\"div\", {\n    ref: ref,\n    className: classnames(\"\".concat(prefixCls, \"-content\"), (_classnames = {}, _defineProperty(_classnames, \"\".concat(prefixCls, \"-content-active\"), isActive), _defineProperty(_classnames, \"\".concat(prefixCls, \"-content-inactive\"), !isActive), _classnames), className),\n    style: style,\n    role: role\n  }, React.createElement(\"div\", {\n    className: \"\".concat(prefixCls, \"-content-box\")\n  }, children));\n});\nPanelContent.displayName = 'PanelContent';\nexport default PanelContent;","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/rc-collapse/es/PanelContent.js"],"names":["_defineProperty","_slicedToArray","React","classnames","PanelContent","forwardRef","props","ref","_classnames","prefixCls","forceRender","className","style","children","isActive","role","_React$useState","useState","_React$useState2","rendered","setRendered","useEffect","createElement","concat","displayName"],"mappings":"AAAA,OAAOA,eAAP,MAA4B,2CAA5B;AACA,OAAOC,cAAP,MAA2B,0CAA3B;AAEA;;AAEA;;AACA,OAAO,KAAKC,KAAZ,MAAuB,OAAvB;AACA,OAAOC,UAAP,MAAuB,Y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AjC,EAAmGd,eAAe,CAACQ,WAAD,EAAc,GAAGe,MAAH,CAAUd,SAAV,EAAqB,mBAArB,CAAd,EAAyD,CAACK,QAA1D,CAAlH,EAAuLN,WAA3N,GAAyOG,SAAzO,CAFW;AAGhCC,IAAAA,KAAK,EAAEA,KAHyB;AAIhCG,IAAAA,IAAI,EAAEA;AAJ0B,GAA3B,EAKJb,KAAK,CAACoB,aAAN,CAAoB,KAApB,EAA2B;AAC5BX,IAAAA,SAAS,EAAE,GAAGY,MAAH,CAAUd,SAAV,EAAqB,cAArB;AADiB,GAA3B,EAEAI,QAFA,CALI,CAAP;AAQD,CAlCkB,CAAnB;AAmCAT,YAAY,CAACoB,WAAb,GAA2B,cAA3B;AACA,eAAepB,YAAf","sourcesContent":["import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\n\n/* eslint-disable no-underscore-dangle */\n\n/* eslint-disable react/prop-types */\nimport * as React from 'react';\nimport classnames from 'classnames';\nvar PanelContent = React.forwardRef(function (props, ref) {\n  var _classnames;\n\n  var prefixCls = props.prefixCls,\n      forceRender = props.forceRender,\n      className = props.className,\n      style = props.style,\n      children = props.children,\n      isActive = props.isActive,\n      role = props.role;\n\n  var _React$useState = React.useState(isActive || forceRender),\n      _React$useState2 = _slicedToArray(_React$useState, 2),\n      rendered = _React$useState2[0],\n      setRendered = _React$useState2[1];\n\n  React.useEffect(function () {\n    if (forceRender || isActive) {\n      setRendered(true);\n    }\n  }, [forceRender, isActive]);\n\n  if (!rendered) {\n    return null;\n  }\n\n  return React.createElement(\"div\", {\n    ref: ref,\n    className: classnames(\"\".concat(prefixCls, \"-content\"), (_classnames = {}, _defineProperty(_classnames, \"\".concat(prefixCls, \"-content-active\"), isActive), _defineProperty(_classnames, \"\".concat(prefixCls, \"-content-inactive\"), !isActive), _classnames), className),\n    style: style,\n    role: role\n  }, React.createElement(\"div\", {\n    className: \"\".concat(prefixCls, \"-content-box\")\n  }, children));\n});\nPanelContent.displayName = 'PanelContent';\nexport default PanelContent;"]},"metadata":{},"sourceType":"module"}