mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-29 21:59:41 +08:00
Merge pull request #6925 from djyde/enable-noImplicitAny-Card
remove `any` from Card component #5627
This commit is contained in:
commit
94e4ddb032
@ -13,15 +13,19 @@ export interface CardProps {
|
|||||||
style?: React.CSSProperties;
|
style?: React.CSSProperties;
|
||||||
loading?: boolean;
|
loading?: boolean;
|
||||||
noHovering?: boolean;
|
noHovering?: boolean;
|
||||||
children?: any;
|
children?: React.ReactChild;
|
||||||
id?: string;
|
id?: string;
|
||||||
className?: string;
|
className?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class Card extends Component<CardProps, any> {
|
export interface RcUtilEventListener extends EventListener {
|
||||||
|
remove: () => undefined; // `EventTarget.removeEventListener()` will return undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
export default class Card extends Component<CardProps> {
|
||||||
static Grid: typeof Grid = Grid;
|
static Grid: typeof Grid = Grid;
|
||||||
container: any;
|
container: HTMLDivElement;
|
||||||
resizeEvent: any;
|
resizeEvent: RcUtilEventListener;
|
||||||
updateWiderPaddingCalled: boolean;
|
updateWiderPaddingCalled: boolean;
|
||||||
state = {
|
state = {
|
||||||
widerPadding: false,
|
widerPadding: false,
|
||||||
@ -50,12 +54,12 @@ export default class Card extends Component<CardProps, any> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
saveRef = (node) => {
|
saveRef = (node: HTMLDivElement) => {
|
||||||
this.container = node;
|
this.container = node;
|
||||||
}
|
}
|
||||||
isContainGrid() {
|
isContainGrid() {
|
||||||
let containGrid;
|
let containGrid;
|
||||||
Children.forEach(this.props.children, (element: any) => {
|
Children.forEach(this.props.children, (element: JSX.Element) => {
|
||||||
if (element && element.type && element.type === Grid) {
|
if (element && element.type && element.type === Grid) {
|
||||||
containGrid = true;
|
containGrid = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user