Browse Source
Merge pull request #17003 from Jarvis1010/master
Export TextProps and update english in error
pull/17005/head
偏右
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
components/typography/Text.tsx
|
|
@ -2,7 +2,7 @@ import * as React from 'react'; |
|
|
|
import warning from '../_util/warning'; |
|
|
|
import Base, { BlockProps } from './Base'; |
|
|
|
|
|
|
|
interface TextProps extends BlockProps { |
|
|
|
export interface TextProps extends BlockProps { |
|
|
|
ellipsis?: boolean; |
|
|
|
} |
|
|
|
|
|
|
@ -10,7 +10,7 @@ const Text: React.SFC<TextProps> = ({ ellipsis, ...restProps }) => { |
|
|
|
warning( |
|
|
|
typeof ellipsis !== 'object', |
|
|
|
'Typography.Text', |
|
|
|
'`ellipsis` is only support boolean value.', |
|
|
|
'`ellipsis` only supports boolean value.', |
|
|
|
); |
|
|
|
return <Base {...restProps} ellipsis={!!ellipsis} component="span" />; |
|
|
|
}; |
|
|
|