diff --git a/components/typography/Base.tsx b/components/typography/Base.tsx index fc79073dbe..45c1b7ec1f 100644 --- a/components/typography/Base.tsx +++ b/components/typography/Base.tsx @@ -20,7 +20,7 @@ import Typography, { TypographyProps } from './Typography'; import Editable from './Editable'; import measure from './util'; -export type BaseType = 'secondary' | 'danger' | 'warning'; +export type BaseType = 'secondary' | 'success' | 'warning' | 'danger'; const isLineClampSupport = isStyleSupport('webkitLineClamp'); const isTextOverflowSupport = isStyleSupport('textOverflow'); diff --git a/components/typography/__tests__/__snapshots__/demo.test.js.snap b/components/typography/__tests__/__snapshots__/demo.test.js.snap index 301796a1fa..d4754a9498 100644 --- a/components/typography/__tests__/__snapshots__/demo.test.js.snap +++ b/components/typography/__tests__/__snapshots__/demo.test.js.snap @@ -856,6 +856,16 @@ exports[`renders ./components/typography/demo/text.md correctly 1`] = ` Ant Design +
+ + Ant Design + +
Ant Design Ant Design + Ant Design Ant Design Ant Design Ant Design diff --git a/components/typography/index.en-US.md b/components/typography/index.en-US.md index 58a3009998..8ff7d4beca 100644 --- a/components/typography/index.en-US.md +++ b/components/typography/index.en-US.md @@ -30,7 +30,7 @@ Basic text writing, including headings, body text, lists, and more. | underline | Underlined style | boolean | false | | | onChange | Trigger when user edits the content | function(string) | - | | | strong | Bold style | boolean | false | | -| type | Content type | `secondary` \| `warning` \| `danger` | - | | +| type | Content type | `secondary` \| `success` \| `warning` \| `danger` | - | success: 4.6.0 | ### Typography.Title @@ -46,7 +46,7 @@ Basic text writing, including headings, body text, lists, and more. | mark | Marked style | boolean | false | | | underline | Underlined style | boolean | false | | | 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 @@ -62,7 +62,7 @@ Basic text writing, including headings, body text, lists, and more. | underline | Underlined style | boolean | false | | | onChange | Trigger when user edits the content | function(string) | - | | | strong | Bold style | boolean | false | | -| type | Content type | `secondary` \| `warning` \| `danger` | - | | +| type | Content type | `secondary` \| `success` \| `warning` \| `danger` | - | success: 4.6.0 | ### copyable diff --git a/components/typography/index.zh-CN.md b/components/typography/index.zh-CN.md index 98aa11b14f..fb6f2742ca 100644 --- a/components/typography/index.zh-CN.md +++ b/components/typography/index.zh-CN.md @@ -30,7 +30,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/GOM1KQ24O/Typography.svg | keyboard | 添加键盘样式 | boolean | false | 4.3.0 | | underline | 添加下划线样式 | boolean | false | | | strong | 是否加粗 | boolean | false | | -| type | 文本类型 | `secondary` \| `warning` \| `danger` | - | | +| type | 文本类型 | `secondary` \| `success` \| `warning` \| `danger` | - | success: 4.6.0 | ### Typography.Title @@ -46,7 +46,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/GOM1KQ24O/Typography.svg | mark | 添加标记样式 | boolean | false | | | underline | 添加下划线样式 | boolean | false | | | onChange | 当用户提交编辑内容时触发 | function(string) | - | | -| type | 文本类型 | `secondary` \| `warning` \| `danger` | - | | +| type | 文本类型 | `secondary` \| `success` \| `warning` \| `danger` | - | success: 4.6.0 | ### Typography.Paragraph @@ -62,7 +62,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/GOM1KQ24O/Typography.svg | underline | 添加下划线样式 | boolean | false | | | onChange | 当用户提交编辑内容时触发 | function(string) | - | | | strong | 是否加粗 | boolean | false | | -| type | 文本类型 | `secondary` \| `warning` \| `danger` | - | | +| type | 文本类型 | `secondary` \| `success` \| `warning` \| `danger` | - | success: 4.6.0 | ### copyable diff --git a/components/typography/style/index.less b/components/typography/style/index.less index 9c432c99b9..597a56d666 100644 --- a/components/typography/style/index.less +++ b/components/typography/style/index.less @@ -12,6 +12,10 @@ color: @text-color-secondary; } + &&-success { + color: @success-color; + } + &&-warning { color: @warning-color; }