mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-16 18:09:22 +08:00
9de44ed4c4
* Typography增加斜体字支持 * update snapshot * 文档添加版本号 Co-authored-by: lidahao <lidahao@sisyphe.com.cn>
43 lines
1.0 KiB
Markdown
43 lines
1.0 KiB
Markdown
---
|
|
order: 2
|
|
title:
|
|
zh-CN: 文本与超链接组件
|
|
en-US: Text and Link Component
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
内置不同样式的文本以及超链接组件。
|
|
|
|
## en-US
|
|
|
|
Provides multiple types of text and link.
|
|
|
|
```jsx
|
|
import { Typography, Space } from 'antd';
|
|
|
|
const { Text, Link } = Typography;
|
|
|
|
ReactDOM.render(
|
|
<Space direction="vertical">
|
|
<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>
|
|
<Text italic>Ant Design (italic)</Text>
|
|
<Link href="https://ant.design" target="_blank">
|
|
Ant Design (Link)
|
|
</Link>
|
|
</Space>,
|
|
mountNode,
|
|
);
|
|
```
|