ant-design/components/result/demo/error.md

72 lines
1.4 KiB
Markdown
Raw Normal View History

---
order: 7
title:
zh-CN: Error
en-US: Error
---
## zh-CN
复杂的错误反馈。
## en-US
Complex error feedback.
```tsx
import { CloseCircleOutlined } from '@ant-design/icons';
2022-05-23 14:37:16 +08:00
import { Button, Result, Typography } from 'antd';
import React from 'react';
const { Paragraph, Text } = Typography;
const App: React.FC = () => (
<Result
status="error"
title="Submission Failed"
subTitle="Please check and modify the following information before resubmitting."
extra={[
<Button type="primary" key="console">
Go Console
</Button>,
<Button key="buy">Buy Again</Button>,
]}
>
<div className="desc">
<Paragraph>
<Text
strong
style={{
fontSize: 16,
}}
>
The content you submitted has the following error:
</Text>
</Paragraph>
<Paragraph>
2020-05-25 14:59:01 +08:00
<CloseCircleOutlined className="site-result-demo-error-icon" /> Your account has been
frozen. <a>Thaw immediately &gt;</a>
</Paragraph>
<Paragraph>
2019-12-25 20:04:23 +08:00
<CloseCircleOutlined className="site-result-demo-error-icon" /> Your account is not yet
2020-05-25 14:59:01 +08:00
eligible to apply. <a>Apply Unlock &gt;</a>
</Paragraph>
</div>
</Result>
);
export default App;
```
2019-12-25 20:04:23 +08:00
```css
.site-result-demo-error-icon {
color: red;
}
```
<style>
[data-theme="dark"] .site-result-demo-error-icon {
color: #a61d24;
}
</style>