import React from 'react' export interface IPropTypes { picurl?: string, link?: string, style?: object, className?: string, childStyle?: object, pageSpace?: Number, space?: Number, [propsName: string]: any } class MagicItem extends React.Component { constructor(props: IPropTypes) { super(props); this.state = { style: {} } } componentWillReceiveProps(nextProps: Readonly, nextContext: any): void { if (nextProps.style) { this.setState({ style: nextProps.style }) } } componentDidMount(): void { } render(): React.ReactElement | string | number | {} | React.ReactNodeArray | React.ReactPortal | boolean | null | undefined { let style = {}; if (this.props.paddingBottom) { style['paddingBottom'] = this.props.space + 'px' } style['paddingRight'] = this.props.space + 'px'; let childStyle = {}; let itemHeights = this.props.itemHeights; if (this.props.itemHeights && this.props.itemHeights.length > 0) { for (let i = 0; i < itemHeights.length; i++) { } } return (
); } } export default MagicItem ;