mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 07:56:28 +08:00
feat: add Typography.Text type success (#26145)
* baseType & style * update demo * update snap * update document * remove type primary
This commit is contained in:
parent
61e01e7c60
commit
ff7aca19cc
@ -20,7 +20,7 @@ import Typography, { TypographyProps } from './Typography';
|
|||||||
import Editable from './Editable';
|
import Editable from './Editable';
|
||||||
import measure from './util';
|
import measure from './util';
|
||||||
|
|
||||||
export type BaseType = 'secondary' | 'danger' | 'warning';
|
export type BaseType = 'secondary' | 'success' | 'warning' | 'danger';
|
||||||
|
|
||||||
const isLineClampSupport = isStyleSupport('webkitLineClamp');
|
const isLineClampSupport = isStyleSupport('webkitLineClamp');
|
||||||
const isTextOverflowSupport = isStyleSupport('textOverflow');
|
const isTextOverflowSupport = isStyleSupport('textOverflow');
|
||||||
|
@ -856,6 +856,16 @@ exports[`renders ./components/typography/demo/text.md correctly 1`] = `
|
|||||||
Ant Design
|
Ant Design
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div
|
||||||
|
class="ant-space-item"
|
||||||
|
style="margin-bottom:8px"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="ant-typography ant-typography-success"
|
||||||
|
>
|
||||||
|
Ant Design
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
class="ant-space-item"
|
class="ant-space-item"
|
||||||
style="margin-bottom:8px"
|
style="margin-bottom:8px"
|
||||||
|
@ -22,6 +22,7 @@ ReactDOM.render(
|
|||||||
<Space direction="vertical">
|
<Space direction="vertical">
|
||||||
<Text>Ant Design</Text>
|
<Text>Ant Design</Text>
|
||||||
<Text type="secondary">Ant Design</Text>
|
<Text type="secondary">Ant Design</Text>
|
||||||
|
<Text type="success">Ant Design</Text>
|
||||||
<Text type="warning">Ant Design</Text>
|
<Text type="warning">Ant Design</Text>
|
||||||
<Text type="danger">Ant Design</Text>
|
<Text type="danger">Ant Design</Text>
|
||||||
<Text disabled>Ant Design</Text>
|
<Text disabled>Ant Design</Text>
|
||||||
|
@ -30,7 +30,7 @@ Basic text writing, including headings, body text, lists, and more.
|
|||||||
| underline | Underlined style | boolean | false | |
|
| underline | Underlined style | boolean | false | |
|
||||||
| onChange | Trigger when user edits the content | function(string) | - | |
|
| onChange | Trigger when user edits the content | function(string) | - | |
|
||||||
| strong | Bold style | boolean | false | |
|
| strong | Bold style | boolean | false | |
|
||||||
| type | Content type | `secondary` \| `warning` \| `danger` | - | |
|
| type | Content type | `secondary` \| `success` \| `warning` \| `danger` | - | success: 4.6.0 |
|
||||||
|
|
||||||
### Typography.Title
|
### Typography.Title
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ Basic text writing, including headings, body text, lists, and more.
|
|||||||
| mark | Marked style | boolean | false | |
|
| mark | Marked style | boolean | false | |
|
||||||
| underline | Underlined style | boolean | false | |
|
| underline | Underlined style | boolean | false | |
|
||||||
| onChange | Trigger when user edits the content | function(string) | - | |
|
| onChange | Trigger when user edits the content | function(string) | - | |
|
||||||
| type | Content type | `secondary` \| `warning` \| `danger` | - | |
|
| type | Content type | `secondary` \| `success` \| `warning` \| `danger` | - | success: 4.6.0 |
|
||||||
|
|
||||||
### Typography.Paragraph
|
### Typography.Paragraph
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ Basic text writing, including headings, body text, lists, and more.
|
|||||||
| underline | Underlined style | boolean | false | |
|
| underline | Underlined style | boolean | false | |
|
||||||
| onChange | Trigger when user edits the content | function(string) | - | |
|
| onChange | Trigger when user edits the content | function(string) | - | |
|
||||||
| strong | Bold style | boolean | false | |
|
| strong | Bold style | boolean | false | |
|
||||||
| type | Content type | `secondary` \| `warning` \| `danger` | - | |
|
| type | Content type | `secondary` \| `success` \| `warning` \| `danger` | - | success: 4.6.0 |
|
||||||
|
|
||||||
### copyable
|
### copyable
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/GOM1KQ24O/Typography.svg
|
|||||||
| keyboard | 添加键盘样式 | boolean | false | 4.3.0 |
|
| keyboard | 添加键盘样式 | boolean | false | 4.3.0 |
|
||||||
| underline | 添加下划线样式 | boolean | false | |
|
| underline | 添加下划线样式 | boolean | false | |
|
||||||
| strong | 是否加粗 | boolean | false | |
|
| strong | 是否加粗 | boolean | false | |
|
||||||
| type | 文本类型 | `secondary` \| `warning` \| `danger` | - | |
|
| type | 文本类型 | `secondary` \| `success` \| `warning` \| `danger` | - | success: 4.6.0 |
|
||||||
|
|
||||||
### Typography.Title
|
### Typography.Title
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/GOM1KQ24O/Typography.svg
|
|||||||
| mark | 添加标记样式 | boolean | false | |
|
| mark | 添加标记样式 | boolean | false | |
|
||||||
| underline | 添加下划线样式 | boolean | false | |
|
| underline | 添加下划线样式 | boolean | false | |
|
||||||
| onChange | 当用户提交编辑内容时触发 | function(string) | - | |
|
| onChange | 当用户提交编辑内容时触发 | function(string) | - | |
|
||||||
| type | 文本类型 | `secondary` \| `warning` \| `danger` | - | |
|
| type | 文本类型 | `secondary` \| `success` \| `warning` \| `danger` | - | success: 4.6.0 |
|
||||||
|
|
||||||
### Typography.Paragraph
|
### Typography.Paragraph
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/GOM1KQ24O/Typography.svg
|
|||||||
| underline | 添加下划线样式 | boolean | false | |
|
| underline | 添加下划线样式 | boolean | false | |
|
||||||
| onChange | 当用户提交编辑内容时触发 | function(string) | - | |
|
| onChange | 当用户提交编辑内容时触发 | function(string) | - | |
|
||||||
| strong | 是否加粗 | boolean | false | |
|
| strong | 是否加粗 | boolean | false | |
|
||||||
| type | 文本类型 | `secondary` \| `warning` \| `danger` | - | |
|
| type | 文本类型 | `secondary` \| `success` \| `warning` \| `danger` | - | success: 4.6.0 |
|
||||||
|
|
||||||
### copyable
|
### copyable
|
||||||
|
|
||||||
|
@ -12,6 +12,10 @@
|
|||||||
color: @text-color-secondary;
|
color: @text-color-secondary;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&&-success {
|
||||||
|
color: @success-color;
|
||||||
|
}
|
||||||
|
|
||||||
&&-warning {
|
&&-warning {
|
||||||
color: @warning-color;
|
color: @warning-color;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user