2019-02-19 11:42:05 +08:00
|
|
|
---
|
|
|
|
order: 2
|
|
|
|
title:
|
2020-05-11 14:28:57 +08:00
|
|
|
zh-CN: 文本与超链接组件
|
|
|
|
en-US: Text and Link Component
|
2019-02-19 11:42:05 +08:00
|
|
|
---
|
|
|
|
|
|
|
|
## zh-CN
|
|
|
|
|
2020-05-11 14:28:57 +08:00
|
|
|
内置不同样式的文本以及超链接组件。
|
2019-02-19 11:42:05 +08:00
|
|
|
|
|
|
|
## en-US
|
|
|
|
|
2020-05-11 14:28:57 +08:00
|
|
|
Provides multiple types of text and link.
|
2019-02-19 11:42:05 +08:00
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
```tsx
|
2022-05-23 14:37:16 +08:00
|
|
|
import { Space, Typography } from 'antd';
|
2022-05-19 09:46:26 +08:00
|
|
|
import React from 'react';
|
2019-02-19 11:42:05 +08:00
|
|
|
|
2020-05-11 14:28:57 +08:00
|
|
|
const { Text, Link } = Typography;
|
2019-02-19 11:42:05 +08:00
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
const App: React.FC = () => (
|
2020-05-11 14:28:57 +08:00
|
|
|
<Space direction="vertical">
|
2020-09-06 11:28:49 +08:00
|
|
|
<Text>Ant Design (default)</Text>
|
|
|
|
<Text type="secondary">Ant Design (secondary)</Text>
|
|
|
|
<Text type="success">Ant Design (success)</Text>
|
|
|
|
<Text type="warning">Ant Design (warning)</Text>
|
|
|
|
<Text type="danger">Ant Design (danger)</Text>
|
|
|
|
<Text disabled>Ant Design (disabled)</Text>
|
|
|
|
<Text mark>Ant Design (mark)</Text>
|
|
|
|
<Text code>Ant Design (code)</Text>
|
|
|
|
<Text keyboard>Ant Design (keyboard)</Text>
|
|
|
|
<Text underline>Ant Design (underline)</Text>
|
|
|
|
<Text delete>Ant Design (delete)</Text>
|
|
|
|
<Text strong>Ant Design (strong)</Text>
|
2021-05-24 16:24:00 +08:00
|
|
|
<Text italic>Ant Design (italic)</Text>
|
2020-05-11 14:28:57 +08:00
|
|
|
<Link href="https://ant.design" target="_blank">
|
2020-09-06 11:28:49 +08:00
|
|
|
Ant Design (Link)
|
2020-05-11 14:28:57 +08:00
|
|
|
</Link>
|
2022-04-03 23:27:45 +08:00
|
|
|
</Space>
|
2019-02-19 11:42:05 +08:00
|
|
|
);
|
2022-05-19 09:46:26 +08:00
|
|
|
|
|
|
|
export default App;
|
2019-02-19 11:42:05 +08:00
|
|
|
```
|