61239.js 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. exports.id = 61239;
  2. exports.ids = [61239];
  3. exports.modules = {
  4. /***/ 66803:
  5. /***/ ((module) => {
  6. // Exports
  7. module.exports = {
  8. "base": "Link_base__9W8Qs",
  9. "highlight": "Link_highlight__HdSrf",
  10. "primary": "Link_primary__rWdtP",
  11. "secondary": "Link_secondary__m0KtR",
  12. "blend": "Link_blend___ORVn"
  13. };
  14. /***/ }),
  15. /***/ 41701:
  16. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  17. "use strict";
  18. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  19. /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
  20. /* harmony export */ });
  21. /**
  22. * Wrap a component `children` with a `wrapper` component if `condition` is `true`.
  23. *
  24. * Reference:
  25. * - https://blog.hackages.io/conditionally-wrap-an-element-in-react-a8b9a47fab2ng.html
  26. * - https://arjayosma.com/how-to-conditionally-wrap-a-react-component/
  27. *
  28. * @param {Props} props
  29. * @returns {JSX.Element}
  30. */ const Wrapper = ({ children , shouldWrap , wrapper })=>shouldWrap ? wrapper(children) : children;
  31. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Wrapper);
  32. /***/ }),
  33. /***/ 61239:
  34. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  35. "use strict";
  36. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  37. /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__),
  38. /* harmony export */ "r": () => (/* binding */ LinkVariant)
  39. /* harmony export */ });
  40. /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(20997);
  41. /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
  42. /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(59003);
  43. /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__);
  44. /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(79165);
  45. /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_2__);
  46. /* harmony import */ var _Link_module_scss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(66803);
  47. /* harmony import */ var _Link_module_scss__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_Link_module_scss__WEBPACK_IMPORTED_MODULE_4__);
  48. /* harmony import */ var _components_Wrapper_Wrapper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41701);
  49. /* eslint-disable react/jsx-no-target-blank */ // eslint failed to lint properly
  50. var LinkVariant;
  51. (function(LinkVariant) {
  52. LinkVariant["Highlight"] = "highlight";
  53. LinkVariant["Primary"] = "primary";
  54. LinkVariant["Secondary"] = "secondary";
  55. LinkVariant["Blend"] = "blend";
  56. })(LinkVariant || (LinkVariant = {}));
  57. const Link = ({ href , children , isNewTab =false , variant , download , className , onClick , shouldPassHref , isShallow =false , shouldPrefetch =true , title , ariaLabel , })=>/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_components_Wrapper_Wrapper__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, {
  58. shouldWrap: !download,
  59. wrapper: (node)=>/*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx((next_link__WEBPACK_IMPORTED_MODULE_2___default()), {
  60. href: href,
  61. ...shouldPassHref && {
  62. shouldPassHref
  63. },
  64. ...shouldPrefetch === false && {
  65. prefetch: false
  66. },
  67. shallow: isShallow,
  68. children: node
  69. }),
  70. children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx("a", {
  71. href: href,
  72. download: download,
  73. target: isNewTab ? "_blank" : undefined,
  74. rel: isNewTab ? "noreferrer" : undefined,
  75. className: classnames__WEBPACK_IMPORTED_MODULE_1___default()((_Link_module_scss__WEBPACK_IMPORTED_MODULE_4___default().base), className, {
  76. [(_Link_module_scss__WEBPACK_IMPORTED_MODULE_4___default().highlight)]: variant === LinkVariant.Highlight,
  77. [(_Link_module_scss__WEBPACK_IMPORTED_MODULE_4___default().primary)]: variant === LinkVariant.Primary,
  78. [(_Link_module_scss__WEBPACK_IMPORTED_MODULE_4___default().secondary)]: variant === LinkVariant.Secondary,
  79. [(_Link_module_scss__WEBPACK_IMPORTED_MODULE_4___default().blend)]: variant === LinkVariant.Blend
  80. }),
  81. ...onClick && {
  82. onClick
  83. },
  84. ...title && {
  85. title
  86. },
  87. ...ariaLabel && {
  88. "aria-label": ariaLabel
  89. },
  90. children: children
  91. })
  92. });
  93. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Link);
  94. /***/ })
  95. };
  96. ;
  97. //# sourceMappingURL=61239.js.map