Sorry, the page you visited does not exist.
@@ -20,7 +142,79 @@ exports[`renders ./components/result/demo/404.md correctly 1`] = `
exports[`renders ./components/result/demo/500.md correctly 1`] = `
-
+
500
Sorry, the server is wrong.
diff --git a/components/result/index.jsx b/components/result/index.jsx
index 5c75e27e8..b53f0072c 100644
--- a/components/result/index.jsx
+++ b/components/result/index.jsx
@@ -3,9 +3,9 @@ import { getOptionProps, getComponentFromProp } from '../_util/props-util';
import { ConfigConsumerProps } from '../config-provider';
import Icon from '../icon';
import Base from '../base';
-import noFound from './noFound.svg';
-import serverError from './serverError.svg';
-import unauthorized from './unauthorized.svg';
+import noFound from './noFound';
+import serverError from './serverError';
+import unauthorized from './unauthorized';
export const IconMap = {
success: 'check-circle',
@@ -34,10 +34,10 @@ export const ResultProps = {
const renderIcon = (h, prefixCls, { status, icon }) => {
if (ExceptionStatus.includes(status)) {
- const svgImg = ExceptionMap[status];
+ const SVGComponent = ExceptionMap[status];
return (
-

+
);
}
@@ -60,7 +60,7 @@ const Result = {
prefixCls: customizePrefixCls,
status,
...restProps
- } = getOptionProps(this);
+ } = this;
const getPrefixCls = this.configProvider.getPrefixCls;
const prefixCls = getPrefixCls('result', customizePrefixCls);
diff --git a/components/result/noFound.jsx b/components/result/noFound.jsx
new file mode 100644
index 000000000..9f352ed89
--- /dev/null
+++ b/components/result/noFound.jsx
@@ -0,0 +1,289 @@
+const NoFound = {
+ functional: true,
+ render() {
+ return(
+
+ );
+ },
+};
+
+export default NoFound;
diff --git a/components/result/noFound.svg b/components/result/noFound.svg
deleted file mode 100644
index 5246a5cdf..000000000
--- a/components/result/noFound.svg
+++ /dev/null
@@ -1,280 +0,0 @@
-
diff --git a/components/result/serverError.jsx b/components/result/serverError.jsx
new file mode 100644
index 000000000..986d03372
--- /dev/null
+++ b/components/result/serverError.jsx
@@ -0,0 +1,334 @@
+const ServerError = {
+ functional: true,
+ render() {
+ return (
+
+ );
+ },
+};
+
+export default ServerError;
diff --git a/components/result/serverError.svg b/components/result/serverError.svg
deleted file mode 100644
index a8e933bb9..000000000
--- a/components/result/serverError.svg
+++ /dev/null
@@ -1,325 +0,0 @@
-
diff --git a/components/result/unauthorized.jsx b/components/result/unauthorized.jsx
new file mode 100644
index 000000000..9fd2f4ac5
--- /dev/null
+++ b/components/result/unauthorized.jsx
@@ -0,0 +1,283 @@
+const Unauthorized = {
+ functional: true,
+ render() {
+ return (
+
+ );
+ },
+};
+
+export default Unauthorized;
diff --git a/components/result/unauthorized.svg b/components/result/unauthorized.svg
deleted file mode 100644
index e3974c977..000000000
--- a/components/result/unauthorized.svg
+++ /dev/null
@@ -1,141 +0,0 @@
-