e95dd3bb88615867e6f2a0c9ba05347f.json 5.28 KB
{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/extends\";\n\nvar __rest = this && this.__rest || function (s, e) {\n  var t = {};\n\n  for (var p in s) {\n    if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n  }\n\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n  }\n  return t;\n};\n\nimport * as React from 'react';\nimport Radio from './radio';\nimport { ConfigContext } from '../config-provider';\nimport RadioGroupContext from './context';\n\nvar RadioButton = function RadioButton(props, ref) {\n  var radioGroupContext = React.useContext(RadioGroupContext);\n\n  var _React$useContext = React.useContext(ConfigContext),\n      getPrefixCls = _React$useContext.getPrefixCls;\n\n  var customizePrefixCls = props.prefixCls,\n      radioProps = __rest(props, [\"prefixCls\"]);\n\n  var prefixCls = getPrefixCls('radio-button', customizePrefixCls);\n\n  if (radioGroupContext) {\n    radioProps.checked = props.value === radioGroupContext.value;\n    radioProps.disabled = props.disabled || radioGroupContext.disabled;\n  }\n\n  return /*#__PURE__*/React.createElement(Radio, _extends({\n    prefixCls: prefixCls\n  }, radioProps, {\n    type: \"radio\",\n    ref: ref\n  }));\n};\n\nexport default /*#__PURE__*/React.forwardRef(RadioButton);","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/antd/es/radio/radioButton.js"],"names":["_extends","__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","Radio","ConfigContext","RadioGroupContext","RadioButton","props","ref","radioGroupContext","useContext","_React$useContext","getPrefixCls","customizePrefixCls","prefixCls","radioProps","checked","value","disabled","createElement","type","forwardRef"],"mappings":"AAAA,OAAOA,QAAP,MAAqB,gCAArB;;A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CAAxB;;AAEA,MAAIM,iBAAiB,GAAGT,KAAK,CAACQ,UAAN,CAAiBN,aAAjB,CAAxB;AAAA,MACIQ,YAAY,GAAGD,iBAAiB,CAACC,YADrC;;AAGA,MAAIC,kBAAkB,GAAGN,KAAK,CAACO,SAA/B;AAAA,MACIC,UAAU,GAAG3B,MAAM,CAACmB,KAAD,EAAQ,CAAC,WAAD,CAAR,CADvB;;AAGA,MAAIO,SAAS,GAAGF,YAAY,CAAC,cAAD,EAAiBC,kBAAjB,CAA5B;;AAEA,MAAIJ,iBAAJ,EAAuB;AACrBM,IAAAA,UAAU,CAACC,OAAX,GAAqBT,KAAK,CAACU,KAAN,KAAgBR,iBAAiB,CAACQ,KAAvD;AACAF,IAAAA,UAAU,CAACG,QAAX,GAAsBX,KAAK,CAACW,QAAN,IAAkBT,iBAAiB,CAACS,QAA1D;AACD;;AAED,SAAO,aAAahB,KAAK,CAACiB,aAAN,CAAoBhB,KAApB,EAA2BhB,QAAQ,CAAC;AACtD2B,IAAAA,SAAS,EAAEA;AAD2C,GAAD,EAEpDC,UAFoD,EAExC;AACbK,IAAAA,IAAI,EAAE,OADO;AAEbZ,IAAAA,GAAG,EAAEA;AAFQ,GAFwC,CAAnC,CAApB;AAMD,CAtBD;;AAwBA,eAAe,aAAaN,KAAK,CAACmB,UAAN,CAAiBf,WAAjB,CAA5B","sourcesContent":["import _extends from \"@babel/runtime/helpers/extends\";\n\nvar __rest = this && this.__rest || function (s, e) {\n  var t = {};\n\n  for (var p in s) {\n    if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n  }\n\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n  }\n  return t;\n};\n\nimport * as React from 'react';\nimport Radio from './radio';\nimport { ConfigContext } from '../config-provider';\nimport RadioGroupContext from './context';\n\nvar RadioButton = function RadioButton(props, ref) {\n  var radioGroupContext = React.useContext(RadioGroupContext);\n\n  var _React$useContext = React.useContext(ConfigContext),\n      getPrefixCls = _React$useContext.getPrefixCls;\n\n  var customizePrefixCls = props.prefixCls,\n      radioProps = __rest(props, [\"prefixCls\"]);\n\n  var prefixCls = getPrefixCls('radio-button', customizePrefixCls);\n\n  if (radioGroupContext) {\n    radioProps.checked = props.value === radioGroupContext.value;\n    radioProps.disabled = props.disabled || radioGroupContext.disabled;\n  }\n\n  return /*#__PURE__*/React.createElement(Radio, _extends({\n    prefixCls: prefixCls\n  }, radioProps, {\n    type: \"radio\",\n    ref: ref\n  }));\n};\n\nexport default /*#__PURE__*/React.forwardRef(RadioButton);"]},"metadata":{},"sourceType":"module"}