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
parent
commit
e46888247d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      components/typography/Text.tsx

4
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" />;
};

Loading…
Cancel
Save