@faasjs/ant-design 0.0.2-beta.412 → 0.0.2-beta.413

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.
package/dist/index.js CHANGED
@@ -779,6 +779,30 @@ function Link({
779
779
  }) {
780
780
  const { Link: Link2 } = useConfigContext();
781
781
  style = Object.assign({ cursor: "pointer" }, style);
782
+ if (href.startsWith("http")) {
783
+ if (button)
784
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd7.Button, {
785
+ ...button,
786
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", {
787
+ href,
788
+ target: target || (Link2 == null ? void 0 : Link2.target) || "_blank",
789
+ style: {
790
+ ...Link2.style,
791
+ ...style || {}
792
+ },
793
+ children: text || children
794
+ })
795
+ });
796
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", {
797
+ href,
798
+ target: target || (Link2 == null ? void 0 : Link2.target) || "_blank",
799
+ style: {
800
+ ...Link2.style,
801
+ ...style || {}
802
+ },
803
+ children: text || children
804
+ });
805
+ }
782
806
  if (button)
783
807
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd7.Button, {
784
808
  ...button,
package/dist/index.mjs CHANGED
@@ -755,6 +755,30 @@ function Link({
755
755
  }) {
756
756
  const { Link: Link2 } = useConfigContext();
757
757
  style = Object.assign({ cursor: "pointer" }, style);
758
+ if (href.startsWith("http")) {
759
+ if (button)
760
+ return /* @__PURE__ */ jsx8(Button3, {
761
+ ...button,
762
+ children: /* @__PURE__ */ jsx8("a", {
763
+ href,
764
+ target: target || (Link2 == null ? void 0 : Link2.target) || "_blank",
765
+ style: {
766
+ ...Link2.style,
767
+ ...style || {}
768
+ },
769
+ children: text || children
770
+ })
771
+ });
772
+ return /* @__PURE__ */ jsx8("a", {
773
+ href,
774
+ target: target || (Link2 == null ? void 0 : Link2.target) || "_blank",
775
+ style: {
776
+ ...Link2.style,
777
+ ...style || {}
778
+ },
779
+ children: text || children
780
+ });
781
+ }
758
782
  if (button)
759
783
  return /* @__PURE__ */ jsx8(Button3, {
760
784
  ...button,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faasjs/ant-design",
3
- "version": "0.0.2-beta.412",
3
+ "version": "0.0.2-beta.413",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -28,7 +28,7 @@
28
28
  "lodash": "*",
29
29
  "react": "*",
30
30
  "react-dom": "*",
31
- "@faasjs/react": "^0.0.2-beta.412",
31
+ "@faasjs/react": "^0.0.2-beta.413",
32
32
  "react-router-dom": "*",
33
33
  "dayjs": "*"
34
34
  },