mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 16:06:28 +08:00
fix typescript type
This commit is contained in:
parent
3bc88ed7fa
commit
b453db3c9b
@ -1,7 +1,9 @@
|
||||
import * as React from 'react';
|
||||
import CopyToClipboard from 'react-copy-to-clipboard';
|
||||
import { Icon, Badge } from 'antd';
|
||||
import { ThemeType } from '../../../../components/icon';
|
||||
import { Icon as AntdIcon, Badge } from 'antd';
|
||||
import { ThemeType, IconProps } from '../../../../components/icon';
|
||||
|
||||
const Icon: React.SFC<IconProps> = AntdIcon;
|
||||
|
||||
export interface CopyableIconProps {
|
||||
type: string;
|
||||
|
@ -1,14 +1,16 @@
|
||||
import * as React from 'react';
|
||||
import { ThemeType } from '../../../../components/icon';
|
||||
import { ThemeType, IconProps } from '../../../../components/icon';
|
||||
import manifest from '@ant-design/icons/lib/manifest';
|
||||
import { Manifest, ThemeType as ThemeFolderType } from '@ant-design/icons/lib/types';
|
||||
import { ThemeType as ThemeFolderType } from '@ant-design/icons/lib/types';
|
||||
import Category from './Category';
|
||||
import { Radio, Icon } from 'antd';
|
||||
import { Radio, Icon as AntdIcon } from 'antd';
|
||||
import { RadioChangeEvent } from 'antd/lib/radio/interface';
|
||||
import { FilledIcon, OutlinedIcon, TwoToneIcon } from './themeIcons';
|
||||
import { categories, Categories, CategoriesKeys } from './fields';
|
||||
import { injectIntl, InjectedIntlProps } from 'react-intl';
|
||||
|
||||
const Icon: React.SFC<IconProps> = AntdIcon;
|
||||
|
||||
interface IconDisplayProps extends InjectedIntlProps {
|
||||
}
|
||||
|
||||
@ -50,7 +52,7 @@ class IconDisplay extends React.Component<IconDisplayProps, IconDisplayState> {
|
||||
});
|
||||
}
|
||||
|
||||
renderCategories(list: Array<{ category: string, icons: string[] }>) {
|
||||
renderCategories(list: Array<{ category: CategoriesKeys, icons: string[] }>) {
|
||||
return list.map(({ category, icons }) => {
|
||||
return (
|
||||
<Category
|
||||
|
@ -1,6 +1,7 @@
|
||||
import * as React from 'react';
|
||||
import { CustomIconComponentProps } from '../../../../components/icon';
|
||||
|
||||
export const FilledIcon: React.SFC = (props: any) => {
|
||||
export const FilledIcon: React.SFC<CustomIconComponentProps> = (props) => {
|
||||
const path = 'M864 64H160C107 64 64 107 64 160v' +
|
||||
'704c0 53 43 96 96 96h704c53 0 96-43 96-96V16' +
|
||||
'0c0-53-43-96-96-96z';
|
||||
@ -14,7 +15,7 @@ export const FilledIcon: React.SFC = (props: any) => {
|
||||
);
|
||||
};
|
||||
|
||||
export const OutlinedIcon: React.SFC = (props: any) => {
|
||||
export const OutlinedIcon: React.SFC<CustomIconComponentProps> = (props) => {
|
||||
const path = 'M864 64H160C107 64 64 107 64 160v7' +
|
||||
'04c0 53 43 96 96 96h704c53 0 96-43 96-96V160c' +
|
||||
'0-53-43-96-96-96z m-12 800H172c-6.6 0-12-5.4-' +
|
||||
@ -30,7 +31,7 @@ export const OutlinedIcon: React.SFC = (props: any) => {
|
||||
);
|
||||
};
|
||||
|
||||
export const TwoToneIcon: React.SFC = (props: any) => {
|
||||
export const TwoToneIcon: React.SFC<CustomIconComponentProps> = (props) => {
|
||||
const path = 'M16 512c0 273.932 222.066 496 496 49' +
|
||||
'6s496-222.068 496-496S785.932 16 512 16 16 238.' +
|
||||
'066 16 512z m496 368V144c203.41 0 368 164.622 3' +
|
||||
|
Loading…
Reference in New Issue
Block a user